5.2.5.3 deny
allow で認証を行わないことを許可したアクション一覧から、一部のアクションを取り除きたいこと場合が出てくるかもしれません。 これを行うには次のようにします。
function beforeFilter() {
$this->Auth->authorize = 'controller';
$this->Auth->allow('delete');
}
function isAuthorized() {
if ($this->Auth->user('role') != 'admin') {
$this->Auth->deny('delete');
}
...
}
function beforeFilter() {$this->Auth->authorize = 'controller';$this->Auth->allow('delete');}function isAuthorized() {if ($this->Auth->user('role') != 'admin') {$this->Auth->deny('delete');}...}


























