2009-12-18 12:56:12 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @copyright 2009 City of Bloomington, Indiana
|
|
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt
|
|
|
|
* @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');
|