Zend_Acl - 每个资源的角色
我正在尝试实现 Zend_Acl。
我以前从未使用过它,虽然我可以在控制器/操作级别上使用基本的 acl 内容,但我需要用户在不同的项目上拥有不同的角色,例如管理员、编辑器等。
因此,用户可以创建项目,并且他们会能够编辑/删除自己的项目,但他们也可能被其他用户邀请作为其他人项目的“编辑者”,因此他们能够编辑该项目,但不能删除它,或者他们可能是“查看者”并且无法编辑/删除,只能查看该项目。
我是否必须用断言来做到这一点,有人有任何指示吗?
I'm trying to implement Zend_Acl.
I've never used it before and whilst I can get basic acl stuff working on the controller/action level, I need users to have different roles on different projects, say admin, editor, etc.
So a user could create projects and they would be able edit/delete their own projects, but they may also be invited by another user as an 'Editor' on the other persons project, so they'd be able to edit that project, but not delete it, or they could be a 'Viewer' and not be able to edit/delete only view that project.
Would I have to do this with assertions, has anyone got any pointers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许动态断言可以解决您的问题。观看这些视频:
http:// alex-tech-adventures.com/development/zend-framework/91-acl-dynamic-assertions.html
http://alex-tech-adventures.com/development/zend-framework/62-allocation-resources-and-permissions- with-zendacl.html
http://alex-tech-adventures.com/development/zend-framework/68-zendregistry-and-authentication-improvement.html
Maybe Dynamic Assertions solve your problems. Take a look at these videos:
http://alex-tech-adventures.com/development/zend-framework/91-acl-dynamic-assertions.html
http://alex-tech-adventures.com/development/zend-framework/62-allocation-resources-and-permissions-with-zendacl.html
http://alex-tech-adventures.com/development/zend-framework/68-zendregistry-and-authentication-improvement.html