acl for edit post page?

我的梦境 提交于 2019-12-12 01:32:31

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!