Access rules defined in accessRules metho of controller

Hi,

Is it possible to access rules defined in accessRules method of Controller classes from other php scripts.

ex.




class DepartmentController extends CController

{

        public function accessRules()

	{

             array('allow', 

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

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

			),

        }


}



Can I access these rules defined in this controller from other parts of my code to check whether a particular user has access to function defined in this controller.

Thanks,

Chamal

you can define an expression, see the api-doc

Hi Mbi,

Thanks for your reply.

What I actually want is to use access rules defined in my DepartmentController in my other php classes.

ex. Menu.php.

Somethin like





user->hasAccess(ControllerName, Action name);//So this method will check user has permission to perform method in controller 

                                             // using accessRules defined inside controller.




Thanks,

Chamal.