我想授予特定操作的访问权限。我有模块:特权,模型:特权,操作:索引和管理。
我这样做
class My_ACL extends Zend_Acl {
public function __construct() {
$this->addRole(new Zend_Acl_Role('admin'));
$this->add(new Zend_Acl_Resource('discussions'))
->add(new Zend_Acl_Resource("privileges"))
->add(new Zend_Acl_Resource('privileges:privilege:index'));
// another way for adding actions.
// ->add(new Zend_Acl_Resource('privileges:privilege',array('index','manage'));
$this->allow('admin', 'account')
->allow('admin', 'privileges:privilege');
}
}
当我这样做时,索引和管理操作不起作用?!