ivanamat / cakephp3-aclmanager

CakePHP 3.x - Acl Manager
MIT License
27 stars 27 forks source link

Unable to use AclManager with another userModel #29

Closed yarkm13 closed 4 years ago

yarkm13 commented 6 years ago

https://github.com/ivanamat/cakephp3-aclmanager/blob/bc6cfe9745ea5f7aae7da73a0cc6d976cbc57225/src/Template/Acl/permissions.ctp#L120

It's impossible to use AclManager if you have renamed user model because 'Users' is hardcoded into permissions check.

Couldn't find Aros node identified by "Array ( [Aros0.model] => Users [Aros0.foreign_key] => 1 ) "

Auth component configured as follows

'authenticate' => [
    \Cake\Controller\Component\AuthComponent::ALL => ['userModel' => 'Members'],
],

and this setting can be accessed by

$this->Auth->getConfig("authenticate");
ivanamat commented 4 years ago

Hi @yarkm13

I will update this plugin soon, I will consider and review that. Thank you very much.

Best regards. Iván Amat