I wrote a similar message before, but it said that it didnt send to mailing
list, and I've looked into it further and found that the problem lies within
acl defining the resource when a custom route is made in the bootstrap file.

In the bootstrap I have the following

$router = $frontController->getRouter();  
$route = new Zend_Controller_Router_Route(
    'wedding/bouquets/:bouquet/:page',
    array(
        'controller' => 'wedding',
        'action'     => 'bouquet'
    )
);
$router->addRoute('bouquets',$route);

$route2 = new Zend_Controller_Router_Route(
    'bouquet/:bouquet/*',
    array(
        'controller' => 'bouquet',
        'action'     => 'bouquet'
    )
                );

$router->addRoute('bouquet',$route2);

In the acl.php file i have this, which works well except in regards to the
custom routes.

$this->add(new Zend_Acl_Resource('default'))
        ->add(new Zend_Acl_Resource('bouquets'));
        $this->add(new Zend_Acl_Resource('admin'));
        $this->addRole(new Zend_Acl_Role('guest'));
        $this->addRole(new Zend_Acl_Role('author'), 'guest');
        $this->allow('guest', 'default')
               ->allow('guest', 'bouquets');


I am able to access /wedding/ but not able to access
wedding/bouquets/category
as it is the custom route.
If i remove the route from the bootstrap I can then access
wedding/bouquet/bouquet/category

Is there anyone that can help me, I've searched the boards, googled, done
everything I could, but can't find anything about this at all.

Thanks for any help

-- 
View this message in context: 
http://www.nabble.com/acl-denying-access-when-custom-route-used-tp20727434p20727434.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to