/** * Set an ARO to inherit permission to an ACO. * * @return void */ public function inherit() { extract($this->_getParams()); if ($this->Acl->inherit($aro, $aco, $action)) { $this->out(__d('cake_acl', 'Permission inherited.')); } else { $this->out(__d('cake_acl', 'Permission was not inherited.')); } }
/** * Constructor. Will return an instance of the correct ACL class as defined in `Configure::read('Acl.classname')` * * @param ComponentRegistry $collection A ComponentRegistry * @param array $config Array of configuration settings * @throws \Cake\Core\Exception\Exception when Acl.classname could not be loaded. */ public function __construct(ComponentRegistry $collection, array $config = []) { parent::__construct($collection, $config); $className = $name = Configure::read('Acl.classname'); if (!class_exists($className)) { $className = App::className('Acl.' . $name, 'Adapter'); if (!$className) { throw new Exception(sprintf('Could not find {0}.', [$name])); } } $this->adapter($className); }