We are going to:
Please consider...
The definition of the ACL can be based on some resources like the URL, or the modules, but in my vase it'is based on the controllers and the actions. This is the most convenient way for me to use it. So here is the class (which is defined under the file name 'Acl.php', and it's located in the 'application/models' directory)
class Application_Model_Acl extends Zend_Acl { public function __construct() { $this->addRole(new Zend_Acl_Role('guest')) ->addRole(new Zend_Acl_Role('developer'), 'guest') ->addRole(new Zend_Acl_Role('qa'), 'developer'); $this->add(new Zend_Acl_Resource('index')) ->add(new Zend_Acl_Resource('auth')) ->add(new Zend_Acl_Resource('projects')) ->add(new Zend_Acl_Resource('issues')) ->add(new Zend_Acl_Resource('comments')); // guest $this->allow('guest'); $this->deny('guest', null, array('create', 'update', 'delete')); // developer $this->allow('developer'); $this->deny('developer', null, array('update', 'delete')); // qa - allow all $this->allow('qa'); } }