Advertisement
dragonbe

Zend_Acl

May 2nd, 2011
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. <?php
  2. class Application_Model_Acl extends Zend_Acl
  3. {
  4.     public function __construct()
  5.     {
  6.         $this->addRole('reader');
  7.         $this->addRole('editor', 'reader');
  8.         $this->addRole('copywriter', 'editor');
  9.        
  10.         $this->addResource('stories');
  11.         $this->addResource('edit-stories');
  12.         $this->addResource('publish-stories');
  13.        
  14.         $this->allow('reader', 'stories', 'read');
  15.         $this->allow('editor', 'edit-stories', array ('create','update'));
  16.         $this->allow('copywriter', 'publish-stories', array ('publish'));
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement