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リダイレクトアクションを設定できますか?