3
votes

I set up a custom Authentication system for my CakePHP application. Now we need to include some ACL to it. I followed the instructions here. Now for some reason I need to use the tables admin_users and admin_user_roles instead of the usual group and users. I can login fine but the ARO search fails. and it gives me the following error.

Warning (512): AclNode::node() - Couldn't find Aro node identified by "Array
(
    [Aro0.model] => User
    [Aro0.foreign_key] => 4
)
" [CORE/Cake/Model/AclNode.php, line 176]
Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in permissions check.  Node          references:
    Aro: Array
    (
        [User] => Array
        (
            [id] => 4
            [admin_user_role_id] => 1
            [email] => [email protected]
            [username] => mio
            [created] => 2012-09-28 08:03:25
            [modified] => 2012-10-01 02:09:42
         )

)

Aco: controllers/Dashboard/index [CORE/Cake/Controller/Component/AclComponent.php, line 303]

It seems to still be looking for it in the User Model. Is there any way to change it so it looks for it in the AdminUsers table?

Looked in the DB and the Model field all point to AdminUser.

1

1 Answers

3
votes

Solved.

Added to Appcontroller this line

'authorize' => array(
'Actions' => array('userModel' => 'AdminUser','actionPath' => 'controllers')

Here AdminUser is the name of my model.