Thanks Chris, I though exactly the same idea. Retrieve the user from DB
using Auth and in isAuthorized check if he's allowed to run certain
functions. What I would like to know is where can I check if Admin Routing
is being used in that request. I mean, how can I ask Cake if the requested
URL is /admin/users or  /users/ ?

I can surely check source code looking for Routing behaviors; but I would
like to know the Cake-way.

Thanks again Chris.

On Tue, Apr 29, 2008 at 9:52 AM, Chris Hartjes <[EMAIL PROTECTED]> wrote:

> On Mon, Apr 28, 2008 at 8:58 PM, Nicolás Andrade
> <[EMAIL PROTECTED]> wrote:
> > Thanks for your time. I will print at least the 3 or 4 first pages of the
> > link you've sent to read in the bed, before sleeping.
> >
> > Any other suggestion??
>
> When I have users that need to have different levels of access to my
> system, I usually think of doing it one of two ways:
>
> 1) using Cake's ACL component (which I don't use, but others have lots
> of success with)
> 2) adding a field to my User model called 'role', set
> $this->Auth->authorize to 'controller', and then checking in my
> isAuthorized() method in the controller whether or not that 'role' can
> have access to that particular action.
>
> Hope that helps.
>
> --
> Chris Hartjes
> Internet Loudmouth
> Motto for 2008: "Moving from herding elephants to handling snakes..."
> @TheKeyBoard: http://www.littlehart.net/atthekeyboard
>
> >
>


-- 
Nicolás Andrade
www.nicoandra.com.ar
www.treintaguita.com.ar

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to