What does your $acl->addResource()
look like?
You can create custom names for each resource, and have to use the same values in isResource
Private area resources
$privateResources = array(
'offers' => array('index'),
//.......
);
foreach ($privateResources as $resource => $actions) {
$acl->addResource(new Resource($resource), $actions);
}
//Public area resources
$publicResources = array(
'index' => array('index'),
//............
'errors' => array('show401', 'show404', 'show500'),
'authorization' => array('index', 'start', 'end'),
'contacts' => array('index', 'send')
);
foreach ($publicResources as $resource => $actions) {
$acl->addResource(new Resource($resource), $actions);
}
//Grant access to public areas to both users and guests
foreach ($roles as $role) {
foreach ($publicResources as $resource => $actions) {
foreach ($actions as $action){
$acl->allow($role->getName(), $resource, $action);
}
}
}