Allow "Guests users" to some pages without login using ACL plugin

Hi,

I’m using ACL plugin, but enabling this cause that the all aplication need a user to access, but i dont wanna do that in all pages/controller, for example I wanna that “visitors” (people that dont login on the website) can be surfing some pages, or some controllers, exist a way to do that?

Thanks in advance

Did you try

$this->Auth->allow($arrayOfActions)

per controller to skip auth for those specific actions?

1 Like

Using in your controller $this->Auth->allow([‘action’]) should work.

1 Like

Thanks both, I tried and works this:

public function beforeFilter(Event $event) {
    $this->Auth->allow('display');
}

in AppController