yes I've read it and thx for the if statement error but still the
index page is shown.

I've even tried doing it without the if statement

function beforeFilter()
  {

       $this->Auth->allow('*');
       $this->Auth->deny('delete','add','edit','index');

}

and still all the indexes are showing up


On May 9, 4:44 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> in your if state your assigning the value the one below compares the values
>
> if ($this->name == 'Admins'){}
>
> have you  read the auth section of book.cakephp.org?
>
> 2008/5/9 Fabian <[EMAIL PROTECTED]>:
>
>
>
> > Hi all.
>
> > I'm having problem using the deny and allow methods for the index
> > function.
>
> > In my app controller I have
>
> > function beforeFilter()
> >  {
>
> >       $this->Auth->allow('*');
> >       $this->Auth->deny('delete','add','edit');
>
> >      if ($this->name = 'Admins'){
> >         $this->Auth->deny('delete','add','edit','index');
> >        }
>
> > }
>
> > so if I try to use any url like admins/add if forces me to login , but
> > it doesn't seem to work for the admins/index
>
> > What is the correct string I have to place in the deny array so it
> > actually denies the index. I've tried using display, read and view.
> > But none of them work.
>
> > Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to