I'm building a project using CakePHP v3.0. This is my original beforeFilter method inside a controller:
public function beforeFilter(Event $event)
{
parent::beforeFilter($event);
$this->Auth->allow('add','logout','authorize');
}
This worked until I installed the app on a different server and 'authorize' action stopped being accessible without authentication. The only solution I found was putting the actions inside an array, like this:
public function beforeFilter(Event $event)
{
parent::beforeFilter($event);
$this->Auth->allow(array('add','logout','authorize'));
}
If I didn't misunderstood CakePHP 3 book the first case should work, shouldn't it?. What's the correct syntax for this situation?. Thanks in advance.