Behaviour of accessRules

Hello,

I have the usual code to create access rules. The problem is that I have this "index" action, which is having the same behaviour when I am authenticated and when I am not. I would like "index" to redirect to login page when not authenticated.


public function filters()

	{

		return array(

			'accessControl', // perform access control for CRUD operations

		);

	}


	public function accessRules()

	{

		return array(

			array('allow',  // allow all users to perform...

				'actions'=>array(),

				'users'=>array('*'),

			),

                        array('deny',  // deny guest users to perform...

				'actions'=>array('index'),

				'users'=>array('?'),

			),

			array('allow', // allow authenticated user to perform...

				'actions'=>array('index'),

				'users'=>array('@'),

			),

			array('allow', // allow admin user to perform...

				'actions'=>array('admin','delete'),

				'users'=>array('admin'),

			),

			array('deny',  // deny all users

				'users'=>array('*'),

			),

		);

	}



How can I manage to do this?

Thanks

Thank you! PERFECT!

Good to know