function getAclFromConf() { if ($this->toolkit->hasConf('acl')) { $configurator = new lmbAclConfigurator($this->toolkit->getConf('acl')); return $configurator->getAcl(); } return new lmbAcl(); }
function testTurnOnDefaultAllowPolicy() { $options = array('roles' => array('guest' => null), 'resources' => array('article' => null)); $configurator = new lmbAclConfigurator($options); $this->assertFalse($configurator->getAcl()->isAllowed('guest', 'article')); $configurator = new lmbAclConfigurator(array_merge(array('default_allow_policy' => true), $options)); $this->assertTrue($configurator->getAcl()->isAllowed('guest', 'article', 'read')); }