0
CakePHP
에 authError
URL을 사용자 정의하는 방법입니까? 나는 내가 AppController
에 배치 한 Auth
구성 요소에 보면 내가 리디렉션 액션 loginRedirect
및 logoutRedirect
을 가지고 있지만 그것이 가능 뭔가 authErrorRedirect
같이 설정하는 것입니다 모르겠어요 :CakePHP에서 authError 리디렉션 동작을 설정하는 방법은 무엇입니까?
<?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 설정 액션을 리디렉션합니까?
사용자가 액세스 할 수없는 리소스로 이동하면 로그인하고 간단하고 명확하게해야합니다. – vitto