Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (38 sloc) 1.32 KB
* @copyright 2012-2014 City of Bloomington, Indiana
* @license GNU/AGPL, see LICENSE.txt
* @author Cliff Ingham <>
use Zend\Permissions\Acl\Acl;
use Zend\Permissions\Acl\Role\GenericRole as Role;
use Zend\Permissions\Acl\Resource\GenericResource as Resource;
$ZEND_ACL = new Acl();
$ZEND_ACL->addRole(new Role('Anonymous'))
->addRole(new Role('Public'), 'Anonymous')
->addRole(new Role('Staff'), 'Public')
->addRole(new Role('Administrator'), 'Staff');
* Declare all the resources
$ZEND_ACL->addResource(new Resource('index'));
$ZEND_ACL->addResource(new Resource('people'));
$ZEND_ACL->addResource(new Resource('users'));
$ZEND_ACL->addResource(new Resource('login'));
$ZEND_ACL->addResource(new Resource('endpoints'));
$ZEND_ACL->addResource(new Resource('clients'));
$ZEND_ACL->addResource(new Resource('embed'));
* Assign permissions to the resources
$ZEND_ACL->allow(null,['login', 'embed']);
// Permissions for unauthenticated browsing
// Allow Staff to do stuff
['people', 'endpoints', 'clients'],
// Administrator is allowed access to everything