On Wed, Nov 10, 2010 at 10:26 PM, huoxito <huox...@gmail.com> wrote:
> found what i was looking for, guess I just had to add this condition,
> thanks to this post 
> http://padariadodenilson.wordpress.com/2010/10/04/criando-uma-area-administrativa-com-cakephp/
>
> if (isset($this->params['admin'])) {
> $this->Auth->deny(‘*’);
> }
> else {
> $this->Auth->allow(‘*’);
> }
>
>
> Is there a simpler way to do it?
>

You don't need the test. Having $this->Auth->allow(‘*’) should not
cause your admin_* methods to be accessible without being logged in as
an admin.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en

Reply via email to