Zend Framework

Add Zend_Application_Resource_Acl

Details

  • Type: New Feature New Feature
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Needs Proposal
  • Affects Version/s: 1.10.0
  • Fix Version/s: 1.10.7
  • 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.

Activity

Hide
Joe Gornick added a comment -

My_Application_Resource_Acl

Show
Joe Gornick added a comment - My_Application_Resource_Acl
Hide
Dolf Schimmel (Freeaqingme) added a comment -

After further discussion it has been decided this will have to go through the proposal process.

Please note that there's already such a proposal, and it is suggested proposers proposing the same collaborate. Having said this, chances are Zend_Acl will be removed with Zend Framework 2.0, and therefore a resource plugin like this may not be that necessary.

Show
Dolf Schimmel (Freeaqingme) added a comment - After further discussion it has been decided this will have to go through the proposal process. Please note that there's already such a proposal, and it is suggested proposers proposing the same collaborate. Having said this, chances are Zend_Acl will be removed with Zend Framework 2.0, and therefore a resource plugin like this may not be that necessary.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: