0
나는이 튜토리얼을 따르고 아무런 오류가 없었지만 acl은 모든 사용자에 대해 모든 동작을 허용했다. aclmanager를 검사하여 모든 권한이 올바르게 표시되고있다. parent : beforeFilter를 추가했다.); 모든 컨트롤러에서. 뭔가 놓친 게 있니? 아무도 나를 도와 줄 수 없나요?Cakephp 2 acl 어떤 동작도 부인하지 않음
이 내 initdb에 기능
public function initDB() {
$group = $this->User->Group;
$group->id = 1;
$this->Acl->allow($group, 'controllers');
$group->id = 2;
$this->Acl->deny($group, 'controllers');
$this->Acl->allow($group, 'controllers/Employees');
$group->id = 3;
$this->Acl->deny($group, 'controllers');
//we add an exit to avoid an ugly "missing views" error message
echo "all done";
}
입니다 이것은 AppController가
function beforeFilter(){
$this->Auth->authorize = array(
'Controller',
'Actions' => array('actionPath' => 'controllers')
);
$this->Auth->authenticate = array('Form' => array('fields' => array('username' => 'username', 'password' => 'password')));
$this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');
$this->Auth->logoutRedirect = array('controller' => 'users', 'action' => 'login');
$this->Auth->loginRedirect = array('controller' => 'employees', 'action' => 'employee_list');
}
또한 채워지는 등'acos'으로 확인하여 ACL 데이터베이스 테이블을 만든다. – input
예 Acl 구성 요소가 활성화되어 있고 acos, aros, aros_acos 테이블이 채워 졌는지 확인했습니다. –