oh try this - could be useful, I just saw it :) -- Andy Dawsons whole blog is a nice resource for Cake, also.
http://www.noswad.me.uk/MiBlog/Blogs/view/ACLPart1 On May 30, 10:00 am, luke BAKING barker <[EMAIL PROTECTED]> wrote: > Hi > > Sounds to me like you have just that - 3 groups - here: I would think > you should use othAuth (for example) as a nice (theres an article) > simple implementation. Why reinvent the wheel, and not do something > that will scale later , or be useful in another app? > > Otherwise, try figuring out the builtin acl / admin routing? > > imho :) > > Luke > > On May 30, 7:46 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > I don't really want to deal with users and groups. I have no need for > > groups in this application at all. > > Basically just visitors/users/admin > > > basically, visitors have no login information > > users have been authenticated and have admin flag set to 0 > > admins have been authenticated and have an admin flag set to 1 or > > something like that > > > I guess i could use the same idea as you said. THe problem is how do i > > get that data to a global view.. thats what i'm working on > > > I'm guessing in my default template i can echo some variable and then > > i just have to make sure that every controller actually sets something > > for that variable. Basically i just want to know what the best way of > > doing that is.. I don't want to add an element to every view though.. > > that seems > > ugly.. but may have to do. > > > On May 29, 1:54 pm, "Tane Piper" <[EMAIL PROTECTED]> > > wrote: > > > > If you use a similar idea to othAuth, and put users into groups - you > > > could show a menu either based on the users group, or the access > > > level. > > > > Some psudocode would be like: > > > > if ($this->User->level = 0) > > > { > > > output ('login')} else if ($this->User->level = 100) { > > > > output (' regular menu')} else if ($this->User->level = 200) { > > > > output ('admin menu') > > > > } > > > > Tane > > > > On 5/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > I have a website and i want to use a specific navigation menu but i > > > > want the links to depend on the state.. Basically there are 1 of the > > > > different navigation menus i want to render, > > > > 1. no user logged in > > > > 2. regular user logged in > > > > 3. admin user logged in > > > > > Currently i have a user model and the appropriate controllers and > > > > views. I figured out how to enforce authentication and what not on the > > > > pages, however i am unsure what a good way of supplying the navigation > > > > menu would be for each. > > > > > Any ideas? I was thinking some kind of a ocmponent or something but > > > > i'm not sure how to use those.. > > > > > Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---