2013-04-22 64 views
0
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 

我的模型名稱是管理沒有用戶,我已經在驗證組件的配置設置ACL CakePHP的錯誤

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'); 

我不知道是怎麼回事用戶沒有在錯誤管理。

在此先感謝。

+0

http://stackoverflow.com/questions/12967707/acl-where-to-configure-custom-usermodel-for-authorize – 2014-02-25 09:32:35

回答

1

請意識到認證是不一樣的訪問控制,雖然你正確配置AuthComponent(表格)身份驗證使用管理模式,ACL仍可以嘗試訪問用戶模型。

欲瞭解更多信息,請參閱這裏的手冊;

http://book.cakephp.org/2.0/en/core-libraries/components/access-control-lists.html#assigning-permissions

這裏;

http://book.cakephp.org/2.0/en/tutorials-and-examples/simple-acl-controlled-application/simple-acl-controlled-application.html#acts-as-a-requester

特別是,分配權限和「請求者」的部分時,「模式」列中。

我意識到這不是一個完整的答案,我沒有在這裏的正確例子,但也許這些建議將幫助您找到解決方案。