Friday, October 29, 2010

Re: Auth->deny problem

The deny function makes Cake require the user to log in. If you
deleted all cookies and tried to access you should be redirected to
your login page.

AuthComponent actually does two different kinds of "auth":
authentication (checking the user is who she says she is) and
authorization (checking the user is allowed to do what she's trying to
do). The allow and deny functions are from the bit that does
authentication, the "authorize" variable is from the authorization
part.

On Oct 29, 3:49 pm, thomaus <tho...@saimiris.com> wrote:
> Ok, thanks. I can now deny some acces, following this articlehttp://book.cakephp.org/view/396/authorize
>
> But still, what is the use of the "deny" function then?
>
> On Oct 29, 1:12 pm, Marco <marco.perg...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Is the variable $this->Auth->authorize set to 'controller'?
>
> > On Oct 29, 5:19 am, thomaus <tho...@saimiris.com> wrote:
>
> > > Hi there,
>
> > > I don't know what's happening with the Auth->deny function, but I
> > > can't make it work properly.
>
> > > Such a function:
>
> > > function beforeFilter()
> > > {
> > >         parent::beforeFilter();
>
> > >         $this->Auth->deny('overview');
>
> > > }
>
> > > in my Users controllers should forbid the access to the url '/users/
> > > overview' right? Well it doesn't work at all, I still can access this
> > > url.
>
> > > Does anybody know what's happening here?
>
> > > Thanks in advance,

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: