If you are refering to your initial setup of your Acl object ( calls to addRole, addResource, allow/deny etc ) then it is really up to you where you place them.
Of course, they'll need to be executed in time for when they are required. Doing this within the bootstrap would seem a good choice.
Because i've gotten in to the habit of extending pretty much everything ZF offers, and the fact that my bootstrap is becoming very bloated, i opted to extend the Zend_Acl class and place my addRole() etc calls within the constructor.
so my bootstrap contains:
PHP Code:
$acl = new WN_acl;
Zend_Registry::set('acl', $acl);
and my custom Acl class:
PHP Code:
class WN_Acl extends Zend_Acl {
public function __construct(){
$this->addRole(new Zend_Acl_Role('guest'))
->addRole(new Zend_Acl_Role('member'), 'guest');
$this->addResource(new Zend_Acl_Resource('index'))
->addResource(new Zend_Acl_Resource('account'));
$this->allow('guest', Array('index', 'account'))
->deny('guest', 'account', Array('logout','profile'))
->allow('member', 'account', Array('logout', 'profile'))
->deny('member', 'account', Array('login', 'register'));
}
};
Actual contents of WN_Acl might not be correct, but you should get the idea.