tags:

views:

21

answers:

1

First you should be aware that I am a new cake convert.

Ok, from what I can tell when a user try's to visit a url they do not have sufficient privileges for, the ACL redirects them to "/" if Auth has loged them in, and login if the user is not already loged in. Also Auth remembers the requested page and on a successful login will attempt to redirect you there, again if you do not have sufficient privileges ACL redirects the user to "/". My question is when the ACL detects that the user does not have the necessary privileges, is there an event or a callback I can catch so I can choose where the user is redirected based on what type of user they are etc. In this particular case I'm using group based permissions and prefix routing.

Thanks.

A: 

You could check for permissions and do the redirect in the beforeFilter() method of your controller or in the AppController if this logic is shared by all of your controllers.

Ramon Marco Navarro
Hi Ramon, thanks for your answer. If this is the only way then ok, but I was hoping to leverage the checks already done by the ACL.
Lee