cakephp group based permissions

Posted by Elwhis on Stack Overflow See other posts from Stack Overflow or by Elwhis
Published on 2011-01-11T09:57:39Z Indexed on 2011/01/11 16:54 UTC
Read the original article Hit count: 183

Filed under:
|
|

Hey guys,

I would like to have group based restrictions that would allow users to access only specified parts of the web. I am new to the whole ACL stuff and I didn't quite get it from the manual :/ therefore I would like to ask some questions.

But before any questions, my routes look like this:

Router::connect('/', array('controller' => 'users', 'action' => 'login'));
Router::connect('/admin/:controller/:action/*', array('prefix' => 'admin', 'admin' => true));
Router::connect('/registered/:controller/:action/*', array('prefix' => 'registered', 'registered' => true));

1.) How do I restrict users from any other group than Administrator to access ONLY the /registered/ part of the web

2.) How do I prevent anyone from using the default addresses like www.example.com/users/add on a global scale (I want only www.example.com/admin/users/add or www.example.com/registered/users/add type of addresses)? This kind of addresses is not event set in the routes.php but they still work.

Any answers apprecated

© Stack Overflow or respective owner

Related posts about authentication

Related posts about cakephp