Re: Login problem
Are you calling beforeFilter() in your controller? If so, do you also
call parent::beforeFilter()?
On Tue, Jul 3, 2012 at 6:15 PM, Paulo Victor <paulopenafort@gmail.com> wrote:
> Well, still shows the same problem. In the other Controller i override this
> method like this:
>
> public function isAuthorized($usuario = null) {
> if (($usuario['Status'] == 'Super') || ($usuario['Status'] ==
> 'Coordenador')) {
> return true;
> }
> if (in_array($this->action, array('edit', 'delete'))) {
> if ($usuario['Id'] != $this->request->params['pass'][0]) {
> return false;
> }
> }
> return true;
> }*/
> public function isAuthorized($usuario = null) {
> // Any registered user can access public functions
> if (empty($this->request->params['Coordenador'])) {
> return true;
> }
>
> // Only admins can access admin functions
> if (isset($this->request->params['Super'])) {
> return (bool)($usuario['Status'] === 'Super');
> }
>
> // Default deny
> return false;
>
> Yes, I know, I tried both of them. Nothing changes...
>
>
> 2012/7/3 Cosmin Paul <cosmin.paul@gmail.com>
>>
>> Make sure you call parent class, If you over-right the `isAuthorized`
>> method.
>>
>> return parent::isAuthorized($user);
>>
>> Maybe this helps you,
>> Cheers
>> Paul
>>
>> --
>> 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+unsubscribe@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+unsubscribe@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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home