logo       

Is this a bad idea? What do you think?: msg#00003

php.zend.framework.auth

Subject: Is this a bad idea? What do you think?

To help with auth and acl I made an action helper that automatically
checks permissions on preDipatch.

My question is would it be bad practice to setup the acl for that
controller in the init like this:

public function init()
{
$acl = $this->_helper->getHelper('Auth')->getAcl();

$acl->add(new Zend_Acl_Resource('default'));
$acl->add(new Zend_Acl_Resource('default.error'), 'default');
$acl->add(new Zend_Acl_Resource('default.index'), 'default');
$acl->allow('guest', 'default');

}

This makes it simple for me to manage the acl on a per controller basis
or should I stick all the acl controls in my custom acl class?



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise