Re: AuthComponent - Multiple Setups
Looks like i've found the problem: the propety sessionKey of AuthComponent is defined as static... So even if i try to change it on my AppController it simply doesn't work for the next verifications. I've submited a ticket on the lighthouse: http://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/2207-authcomponentsessionkey-property-cannot-be-changed -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: AuthComponent - Multiple Setups
No... I have two separated prefixes, one called "aluno" (model Student) and other called "admin" (model User). I want to create separate authenticatated areas, and a logged user can't access both. That's why I created two AuthComponent configurations, using different models and options. But at version 2.0 if your're already logged you have access to every AuthComponent configuration, even if the SessionKey change... Looks like a bug to me. Regards, -- ***Thiago Belem* Desenvolvedor Rio de Janeiro - RJ - Brasil +55 (21) 8865.9250 thiagobelem.net cont...@thiagobelem.net *Skype / gTalk **»* thiago.belem.web *LinkedIn* *»* br.linkedin.com/in/thiagobelem/pt* Assando Sites*, curso de CakePHP *»* assando-sites.com.br 2011/11/2 Điển vũ > Edit: Do you mean : *Admin* to the *Student* login screen if I can't find > a *Admin *? > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group > at http://groups.google.com/group/cake-php > -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: AuthComponent - Multiple Setups
Edit: Do you mean : *Admin* to the *Student* login screen if I can't find a *Admin *? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
AuthComponent - Multiple Setups
I'm using the *AuthComponent* to control the access to two prefixes: "admin" and "student". I'm changing the AuthComponent configuration (model, fields, userScope, loginAction and even sessionKey) on AppController::beforeFilter() but once i'm logged with one user Model at "admin', AuthComponent says i'm authenticated to access the other prefix, with another configuration. You can see my beforeFilter here: https://gist.github.com/1334862 As you can see on my code, there's a commented line on the Student prefix configuration (called "aluno" on my code): $this->Auth->authorize = array('Controller'); This was my ugly workaround to redirect the *Admin* to the *Student* login screen if I can't find a student with the logged user data (name, email and etc.) Mind that I have two user models (not two user roles): User and Student, with different data and fields. This used to work back in the 1.3 days... Thanks, -- ***Thiago Belem* Desenvolvedor Rio de Janeiro - RJ - Brasil +55 (21) 8865.9250 thiagobelem.net cont...@thiagobelem.net *Skype / gTalk **»* thiago.belem.web *LinkedIn* *»* br.linkedin.com/in/thiagobelem/pt* Assando Sites*, curso de CakePHP *»* assando-sites.com.br -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php