我在 CakePHP 1.3 中使用 ACL 没有任何问题,经过 2 周的痛苦挫折后,它仍然无法在 CakePHP 2.0 中工作。
我完全按照 Cake ACL 教程进行操作,但没有任何反应。所有 Aros 都正确,ACOS 和权限相同。
毕竟,我可以毫无问题地输入所有被拒绝的操作。
特此我的AppController:
public $components = array('Acl','Auth'=> array(
'authenticate' => array(
'Actions',
'Form' => array(
'fields' => array('username' => 'email')
),
)
), 'Session', 'MathCaptcha', 'RequestHandler');
在我的前置过滤器中:
$this->Auth->actionPath = 'controllers';
$this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');
$this->Auth->logoutRedirect = array('controller' => 'pages', 'action' => 'home');
$this->Auth->loginRedirect = array('controller' => 'users', 'action' => 'profile');
$this->Auth->allow('display');
有人知道出了什么问题。谢谢!