我正在尝试设置 cakephp ACL 权限。
public function initDB() {
$group = $this->User->Group;
//root
$group->id = 1;
$this->Acl->allow($group, 'controllers');
//admin
$group->id = 2;
$this->Acl->allow($group, 'controllers/Users');
//cliente
$group->id = 3;
$this->Acl->deny($group, 'controllers');
$this->Acl->allow($group, 'controllers/Pages');
PROBLEM BELOW ----------------------------------------------
$this->Acl->allow($group, 'controllers/Users/trocar_senha/')
echo "all done";
exit;
}
这也否认了用户的行动“trocar_senha”。但我想允许这样做并拒绝用户控制器的所有休息操作。
如何允许特定操作并拒绝控制器的所有其余操作?
谢谢!