I set up the basic Authentication/Authorization set up, but a problem now is that every time I try to access the http://localhost:1234/, it requires user to login.
How/Where do I make the Auth->authorize("index") on the main page?
I set up the basic Authentication/Authorization set up, but a problem now is that every time I try to access the http://localhost:1234/, it requires user to login.
How/Where do I make the Auth->authorize("index") on the main page?
Inside app_controller.php's beforeFilter():
$this->Auth->authorize("display");
fixed the problem.
In the beforeFilter() of your controller
add the following piece of code
> $this->Auth->allow('actionname');
for suppose if I want to allow adding/registering of user without logging in then I would do like this in the beforeFilter() function of the users_controller.php file.
> $this->Auth->allow('add');