问题
i wonder if i shld use an ACL rule (PHP/Zend_Acl in my case) for something as small as a edit post page? i guess the criteria to allow users to edit a post will be
- owner of post
- editors/moderators/admin
the question will be if yes (to use acl), how can i define it (i am using Zend_Acl but if u give me some code example, i might be able to translate it).
acl's i think will generally be defined at application start/bootstrap. in this case, its partially dynamic as in i must chk against the logged in user.
or will a simple if else suffice?
回答1:
i think its called Assertions
- Dynamic Assertions in Zend Framework
- Docs: Assertions
来源:https://stackoverflow.com/questions/3353075/acl-for-edit-post-page