2011年1月21日星期五

[fw-mvc] Re: ACL stuck in a loop

Try this

ACL Class:
$this->add(new Zend_Acl_Resource('default'))
->add(new Zend_Acl_Resource('default:index'), 'default')
->add(new Zend_Acl_Resource('default:error'), 'default')
->add(new Zend_Acl_Resource('default:user'), 'default');

$this->allow('guest', 'default:error');
$this->allow('guest', 'default:index', array('some action', ' some
action'));
$this->allow('guest', 'default:user');

Using simple:

if(!$this->_acl->isAllowed(Zend_Registry::get('role'),
$module.':'.$resource, $action)){
$request->setControllerName('index')
->setActionName('login');
}
--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/ACL-stuck-in-a-loop-tp3230017p3230042.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: