2009-12-18 12:56:12 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @copyright 2009 City of Bloomington, Indiana
|
2011-06-14 13:29:37 +00:00
|
|
|
* @license http://www.gnu.org/licenses/agpl.txt GNU/AGPL, see LICENSE.txt
|
2009-12-18 12:56:12 +00:00
|
|
|
* @author Cliff Ingham <inghamn@bloomington.in.gov>
|
|
|
|
*/
|
|
|
|
$ZEND_ACL = new Zend_Acl();
|
|
|
|
/**
|
|
|
|
* Load the roles from the database
|
|
|
|
*/
|
|
|
|
$roles = new RoleList();
|
|
|
|
$roles->find();
|
|
|
|
foreach ($roles as $role) {
|
|
|
|
$ZEND_ACL = $ZEND_ACL->addRole(new Zend_Acl_Role($role->getName()));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Declare all the resources
|
|
|
|
*/
|
|
|
|
$ZEND_ACL->add(new Zend_Acl_Resource('Users'));
|
|
|
|
$ZEND_ACL->add(new Zend_Acl_Resource('Deeds'));
|
2009-12-18 17:40:05 +00:00
|
|
|
$ZEND_ACL->add(new Zend_Acl_Resource('Interments'));
|
2009-12-18 12:56:12 +00:00
|
|
|
$ZEND_ACL->add(new Zend_Acl_Resource('Cemeteries'));
|
2010-01-04 15:47:15 +00:00
|
|
|
$ZEND_ACL->add(new Zend_Acl_Resource('Sections'));
|
2009-12-18 12:56:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Assign permissions to the resources
|
|
|
|
*/
|
|
|
|
// Administrator is allowed access to everything
|
|
|
|
$ZEND_ACL->allow('Administrator');
|
|
|
|
|
|
|
|
$ZEND_ACL->allow('Editor','Deeds');
|
2009-12-18 17:40:05 +00:00
|
|
|
$ZEND_ACL->allow('Editor','Interments');
|