PHP,ZF:用于模块控制器动作的Zend_Acl

我需要一些示例(URL)来添加Zend_Acl(角色和规则,允许访问或拒绝操作)。 我用谷歌搜索,但没有找到我需要的 - 一步一步指导提供模块的这种操作,而不仅仅是控制器动作。 </ p>

顺便说一句,如果在例子中使用Zend_Config会很好。</ p>

提前使用Thx!</ p>
</ div>

展开原文

原文

I need some examples (URLs) for adding Zend_Acl (roles and rules, allowing to visit or deny actions). I've googled but didn't find exactly that I need - step by step guide to provide such operations with module, not just controller-action.

BTW, it's good if in example will be used Zend_Config.

Thx in advance!

php

2个回答



从阅读手册开始 </ p>

在要求其他人为您找到文章之前,您至少应尝试解决问题。</ p>
\ n

但如果不这样做,我就是这样做的:</ p>


  • ACL资源是我的模块</ li>
  • ACL权限是我的 controller </ li>
  • 登录用户有角色</ li>
  • 检查ACL以进行访问时,请使用登录用户的角色并使用请求对象的模块和控制器进行ACL 资源和特权</ li>
    </ ul>
    </ div>

展开原文

原文

Start by reading the manual

You should at least attempt to solve the problem before asking for others to find articles for you.

But failing that, this is what I do:

  • An ACL resource is my module
  • An ACL privilege is my controller
  • A logged in user has a role
  • When checking the ACL for access, use the logged in user's role and use the request object's module and controller for your ACL resource and privilege

Some tutorials here Zendcasts,com > Access Control not sure if its what you are looking for, have a look see.

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐