Reputation: 33
AclNode::node() - Couldn't find Aro node identified by "Array ( [Aro0.model] => User [Aro0.foreign_key] => 1 ) "
Error: An Internal Error Has Occurred.
Stack Trace
My model name is Admin not user, I have set it in the Auth component configurations
public $components = array('Acl',
'Auth' => array(
'loginRedirect' => array('controller' => 'admins', 'action' => 'index'),
'logoutRedirect' => array('controller' => 'admins', 'action' => 'login'),
'loginAction' => array('controller' => 'admins','action' => 'login'),
'authError' => '<font color="red">Did you really think you are allowed to see that? If yes then login!</font>',
'authenticate' => array(
'Form' => array(
'userModel' => 'Admin',
'fields' => array('username' => 'username', 'password' => 'password')
)
)
), 'Session', 'Email');
I don't know how it is User not Admin in the error.
Thanks in advance.
Upvotes: 0
Views: 1148
Reputation: 29147
Please realise that Authentication is not the same as Access Control, although you properly configured your AuthComponent
(Form) authentication to use the Admin model, the ACL may still be trying to access the User model.
For more information, please refer to the manual here;
And here;
Especially, the 'model' column when assigning permissions and the section on 'requester'.
I realise this is not a full answer, I don't have the right examples at hand here, but maybe these suggestions will help you to find the solution.
Upvotes: 1