这是一种自定义authError
URL的方法CakePHP
吗?如果我查看我放入的Auth
组件,AppController
我有一个重定向操作loginRedirect
,logoutRedirect
但我不知道是否可以设置如下内容authErrorRedirect
:
<?php
class AppController extends Controller {
public $components = array(
'Session',
'Auth' => array(
'loginRedirect' => array('controller' => 'users', 'action' => 'index'),
'logoutRedirect' => array('controller' => 'users', 'action' => 'index'),
'authError' => 'You don\'t have the right to go there.',
// something like this
'authErrorRedirect' => array('controller' => 'users', 'action' => 'login'),
'authorize' => array(
'Controller',
'Actions' => array(
'actionPath' => 'controllers'
)
),
'authenticate' => array(
'Form' => array(
'fields' => array('username' => 'email')
)
)
),
'Acl'
);
我可以设置 authError 重定向操作吗?