Issues

ZF-8501: Add Zend_Application_Resource_Acl

Issue Type: New Feature Created: 2009-12-08T16:44:04.000+0000 Last Updated: 2010-07-16T14:10:07.000+0000 Status: Resolved Fix version(s): - 1.10.7 (28/Jul/10)

Reporter: Joe Gornick (jgornick) Assignee: Dolf Schimmel (Freeaqingme) (freak) Tags: - Zend_Application_Resource

Related issues: Attachments: - Acl.php

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.

<pre class="highlight">
# 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.

Comments

Posted by Joe Gornick (jgornick) on 2009-12-08T16:44:51.000+0000

My_Application_Resource_Acl

Posted by Dolf Schimmel (Freeaqingme) (freak) on 2010-07-16T14:09:52.000+0000

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.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts