Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $this->addResource(new Zend_Acl_Resource('books'));
- $this->addResource(new Zend_Acl_Resource('login'));
- $this->addResource(new Zend_Acl_Resource('logout'));
- $this->addRole(new Zend_Acl_Role('guest'));
- $this->addRole(new Zend_Acl_Role('user'), 'guest');
- $this->allow('guest', 'login');
- $this->allow('user','logout');
- $this->allow('user','books');
- $this->deny('guest', 'logout');
- $this->deny('user', 'login');
- <configdata>
- <nav>
- <books>
- <label>Books</label>
- <controller>books</controller>
- <action>index</action>
- <resource>books</resource>
- <pages>
- <add>
- <label>Add</label>
- <controller>books</controller>
- <action>add</action>
- </add>
- <edit>
- <label>Edit</label>
- <controller>books</controller>
- <action>edit</action>
- </edit>
- <delete>
- <label>Delete</label>
- <controller>books</controller>
- <action>delete</action>
- </delete>
- </pages>
- </books>
- </nav>
- </configdata>
- $this->allow('guest', 'books', array('index', 'add')
- $this->allow('user', 'books', array('edit','delete')); // index & add are inherited
- $this->deny($this->editor,'artist',array('delete'));
Add Comment
Please, Sign In to add comment