Hi,
In my application I've a acl plugin loaded by application.ini
resources.frontController.plugins.Acl = "W_Controller_Plugin_Acl"
this is its nitty-gritty of the plugin
$this->addRole(new Zend_Acl_Role('admin'));
//$this->_loadResources();
//$this->_loadUsersPermissions();
$this->addRole(new Zend_Acl_Role('user'));
//load common resources
$this->add(new Zend_Acl_Resource('default_index'));
$this->add(new Zend_Acl_Resource('default_error'));
$this->add(new Zend_Acl_Resource('default_auth'));
$this->add(new Zend_Acl_Resource('default_user_index'));
// set up the access rules everybody
$this->allow(null, array('default_index', 'default_error','default_auth'));
//grant the super admin access to everything
$this->allow('admin');
Without route if I go to user/index as null role (not allowed)
the script do the work (login)
but if I put in the bootstrap a route like this
protected function _initRoutes()
{
$this->bootstrap('frontController');
$front = $this->getResource('frontController');
$router = $front->getRouter();
$router->addRoute(
'user',
new Zend_Controller_Router_Route(
'user/:username',
array(
'controller' => 'user',
'action' => 'index'
))
);
}
I gain the access and I don't understand why :(
Could you help me, please ?
Bye.
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/Acl-with-a-custom-route-doesn-t-work-tp3171768p3171768.html
Sent from the Zend Framework mailing list archive at Nabble.com.