Common sense? Cheers, mbavio
On Apr 28, 9: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?? > > Greets! > > Nicolás Andrade > (Wikipedia Reader) > > > > On Mon, Apr 28, 2008 at 7:51 PM, Marcin Domanski <[EMAIL PROTECTED]> wrote: > > Ok > > You _don't_ need 2 models for different users , will you make a third > > one for moderators ? 4th for editors ? 5th... > > Why not make a user table with an 'is_admin' bool field and check on > > that ? Or even more generic - a 'role' field. > > Try to read some more on database design (you can start at wikipedia > > [1] but dont take normal forms too serious) > > I don't know what to gice you about app development... try to look at > > code that other people wrote (bakery, cheesecake photoblog, even the > > code generated by bake) > > > HTH, > > > [1]http://en.wikipedia.org/wiki/Database_normalization > > > On Tue, Apr 29, 2008 at 12:19 AM, Nicolás Andrade > > <[EMAIL PROTECTED]> wrote: > > > Problem: Using different tables for Auth Components (Users and Admins > > > Tables) > > > > I was thinking... > > > > If I browse to /admin/users/ I will be asked for an admin login; and the > > > login will be checked with the admin table. > > > If I browse to /users/editProfile/ I well be asked for an user login; > > and > > > the login will be checked with the users table. > > > > So, The only thing I have to do is check if I'm trying to access an > > /admin/ > > > resource in beforeFilter; and then define how will I validate (which > > table). > > > > Is this right? Does anyone how to do it, or any other suggestion? > > > > Thanks! > > > > Nicolás Andrade > > > > On Mon, Apr 28, 2008 at 12:46 PM, Nicolás Andrade > > > <[EMAIL PROTECTED]> wrote: > > > > > Hi to all; as a few days ago was suggested in this list; I started > > using > > > AUTH component and Admin Routing to validate Administrators. > > > > > Now, I've 2 "Users" models; (Front End) Users and Admins. > > > > > Each Admin function has Admin_ on it's name. Ok. > > > > > In the Users controller appears the problem. > > > > > The Admin_DeleteUser method is Admin-Password-Protected by Auth, i.e.: > > > > > function beforeFilter(){ > > > > $this->Auth->userModel = 'Admin'; > > > > $this->Auth->fields = array('username' => 'email', > > 'password' > > > => 'password'); > > > > } > > > > > And now I have to protect the EditProfile method so each user must > > > validate himself before editing his profile. I need double-auth; one > > related > > > to Administration Functions and another related to Users functions. > > > > > I mean > > > > > Admin_DeleteUser() must be Admin protected using Admin model. > > > > EditProfile() (or User_EditProfile() if necessary) must be protected > > using > > > User model. > > > > > As English is not my primary language it's so hard to search this topic > > on > > > Google. Any suggestion?? > > > > > Thanks thanks thanks! > > > > > Nicolás > > > > -- > > > Nicolás Andrade > > >www.nicoandra.com.ar > > >www.treintaguita.com.ar > > > -- > > Marcin Domanski > >http://kabturek.info > > -- > Nicolás Andradewww.nicoandra.com.arwww.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 -~----------~----~----~----~------~----~------~--~---
