tags:

views:

165

answers:

2

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?

+1  A: 

Inside app_controller.php's beforeFilter():

 $this->Auth->authorize("display");

fixed the problem.

bLee
A: 

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');
Gaurav Sharma
But that wasn't my question, and I already know about Auth's allow function, it was just not working with the main page on DocumentRoot.
bLee