English 中文(简体)
ACL诉控制员案
原标题:Resource based ACL vs controller based ACL

传统的控制人员行动管理办法,是为每个控制/管理/控制/行动创造资源(强化识别标志),然后将《控制法》检查为控制者。

不久前,我发现了非常手提的<代码>Zend_Acl_Resource_Interface,可用于控制使用该编码的任何类别。 这样,任何模型、表格或其他应用要素都可以成为《欧洲渔业公约》的资源。 这是一种非常常识的做法,因为这样,应用资源就成为《欧洲常规武装力量》的资源。

这一点非常容易地听懂理论,因此我根本不需要控制者的任何额外的逻辑。

Now, I can check the ACL e.g. whenever any form is instantiated and eventually redirect to login page.
But how can I hide Zend Navigation items which use restricted forms, models etc.
Do I need the traditional, controller oriented approach as well? Do I need a separate resource identifier for each navigation element? What s the benefit of using resource based ACL then?

最佳回答

你可以将相应的资源分配到Zentd_Navigation page items,确定预先定义的ACL,目前把用户的作用留给Zend_Navigatione,导航助手先检查ACL。 请见以下例子:http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers. initial.navigation.acl

问题回答

暂无回答




相关问题
Choosing the right subclass to instantiate programmatically

Ok, the context is some serialization / deserialization code that will parse a byte stream into an object representation that s easier to work with (and vice-versa). Here s a simplified example ...

Design pattern for managing queues and stacks?

Is there a design pattern for managing a queue or a stack? For example, we are looking to manage a list of tasks. These tasks will be added to a group queue, users will then be able to pull off the ...

Organizing classes using the repository design pattern

I have started upgrading one of our internal software applications, written in ASP.NET Web Forms, and moving to ASP.NET MVC. I am trying to leverage the Repository design pattern for my classes, ...

Misuse of Observer Pattern?

I have a Car object which contains a latitude field and a longitude field. I use the observer pattern so that any time either of these fields change in my application, my car object is notified. I ...

How are Models (in MVC) and DAOs supposed to interact?

How are models and DAOs supposed to interact? I m in the process of putting together a simple login module and I m unsure where to put the "business logic." If I put the logic with the data in the ...

热门标签