Saturday, October 29, 2011

ACL and mapActions problem

Hello all :)

I have a problem with the ACL en Auth mapActions function. I can't
set the rights (read, edit, add, delete) to each function in de
controller as I want. With the plugin I use I have to set all the
right to true to even view a dashboard page at the page controller.

So want I'm using.
CakePHP 1.3.13 and a plugin to manage the ACL, https://github.com/interlock/acl_plugin.

I build the acos list with the build_acl function provided in the cake
book. The rights I want to mange by groups so I have set that up in
the models of users en goups.

I have the following code at my pages controller:
function beforeFilter() {
parent::beforeFilter();
$this->Auth->mapActions(
array(
'read' => array('display','dashboard')
)
);
}

By setting this it should be able to set read to true in my aros_acos
row for the Pages controller, right?
controllers > Pages delete -> false update -> false read -> true
create -> false.

I did this for my editors group, but I still cant view this dashboard
as an editor. I get an end less refresh so the browser stops it.
Probably to refresh to the login page. When I set all right true I can
see the page.

The code is avaible here to view.
https://bitbucket.org/Davidvdv/sociale-kaart/src/bef7409f36b1/app

What should I change to make this work?

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: