mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-08 04:22:40 +00:00
Loading additional ACL model classes in AclBehavior
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4492 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
de3d0bb193
commit
45bff19372
1 changed files with 4 additions and 2 deletions
|
@ -45,12 +45,14 @@ class AclBehavior extends ModelBehavior {
|
|||
if (is_string($config)) {
|
||||
$config = array('type' => $config);
|
||||
}
|
||||
$this->settings[$model->name] = am(array('type' => 'Requester'), $config);
|
||||
$this->settings[$model->name] = am(array('type' => 'requester'), $config);
|
||||
$type = $this->__typeMaps[$this->settings[$model->name]['type']];
|
||||
|
||||
if (!ClassRegistry::isKeySet($type)) {
|
||||
uses('controller' . DS . 'components' . DS . 'dbacl' . DS . 'models' . DS . 'aclnode');
|
||||
uses('controller' . DS . 'components' . DS . 'dbacl' . DS . 'models' . DS . low($type));
|
||||
uses('controller' . DS . 'components' . DS . 'dbacl' . DS . 'models' . DS . 'aco');
|
||||
uses('controller' . DS . 'components' . DS . 'dbacl' . DS . 'models' . DS . 'aro');
|
||||
uses('controller' . DS . 'components' . DS . 'dbacl' . DS . 'models' . DS . 'permission');
|
||||
$object =& new $type();
|
||||
} else {
|
||||
$object =& ClassRegistry::getObject($type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue