On 10/17/07, MysteryMadman <[EMAIL PROTECTED]> wrote:
>
> 3-If possible, code one UsersController, which allows for normal (i.e.
> non-scaffolded) views for users of level 1 (i.e. normal users), and
> scaffolded (admin routed?) views for users of levels 2 (i.e.
> administrators).
You can use the built-in admin routing to handle this stuff. For any
admin action, just be sure to prepend 'admin_' to your action.
> 4-Use the user level of the currently logged in user to switch between
> these views, using a beforeFilter - checksession trick (as shown in
> the authentication tutorial), but then actively choosing between
> different routes too.
If you check my blog I've done a very basic tutorial on using the Auth
component and factored in that sort of stuff. No session checking,
just using $this->Auth->user('nameOfFieldThatSaysYouAreAnAdmin') as
the method of figuring out who can access admin actions.
Hope that helps.
--
Chris Hartjes
My motto for 2007: "Just build it, damnit!"
@TheKeyboard - http://www.littlehart.net/atthekeyboard
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---