Reputation: 58
I'm using zend_acl to manage ACL lists in my web application.
To be able to show a 'Manage Permissions' Dialogue I need a possibility to get defined rules for the following combinations:
- rules set for a specific role on a specific resource
- all rules that have been set for roles on a specific resource (who has which rights on this)
- all rules that have been set for a specific role on any resource (which rights does the role have)
To be able to display a complete list there must always be an additional list with rules that have been inherited from parent roles/resources.
Do you have any idea how to solve this?
Upvotes: 2
Views: 1010
Reputation: 11217
For overview we created a table where horizontally are resources, vertcally roles (received as MiPnamic suggested). And in the body of the table there are zeros a ones (allowed, denied). It works fine.
Upvotes: 0
Reputation: 1267
You can retrieve all the roles and the resources this way
$acl = new Application_Model_Acl();
$acl->getRegisteredRoles(); // roles instances
$acl->getRoles(); //array
$acl->getResources(); //array
I think you have to extend Zend_Acl for retrieve the "registered resources per role".
If the project is so "extended", usually, I generate the Acl dinamically from database, but I created a Zend_Acl extension by my side
Upvotes: 2