Details
-
Type:
New Feature
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Needs Proposal
-
Affects Version/s: 1.10.0
-
Fix Version/s: 1.10.7
-
Component/s: Zend_Application_Resource
-
Labels:None
Description
For simple ACL implementations, this would allow the user to configure the ACL in the application.ini. Granted this could be easily done in the Bootstrap.php in an _initAcl() method, but I prefer to keep most of my configuration in my application.ini.
Here's a sample application.ini for setting up the ACL.
application.ini
# Adding a role
# resources.acl.roles.{roleName}.id = {roleId}
resources.acl.roles.guest.id = "G"
# Assigning parents to a role
# resources.acl.roles.{roleName}.parents = {parentRoleIds} (multiple in csv)
resources.acl.roles.user.id = "U"
resources.acl.roles.user.parents = "G"
# Adding a resource
# resources.acl.resources.{resourceName}.id = {resourceId}
resources.acl.resources.index.id = "I"
resources.acl.resources.error.id = "E"
# Add a role with a parent
# resources.acl.resources.{resourceName}.parent = {parentResourceId}
# Adding rules to resources
# resources.acl.resources.{resourceName}.{ruleType}.{privilege}.roles = {roleIds} (multiple in csv)
resources.acl.resources.index.allow.all.roles = "all"
resources.acl.resources.error.allow.all.roles = "all"
resources.acl.resources.users.allow.all.roles = "U"
resources.acl.resources.users.deny.edit.roles = "G"
resources.acl.resources.users.deny.delete.roles = "G"
# When resourceName, privilege and/or roleIds is "all", it will be substituted with null when adding rules
# resources.acl.resources.all.allow.all.roles = "all"
I've attached the resource to this issue.
My_Application_Resource_Acl