checkAcess of any one of actions in Role-Based auth

I can check access for any particular action of task. like :


Yii::app()->user->checkAccess('Category.create') ;

Task : Category operations : create,update,index

how would i check user has one of the operation is permitted.

I need to check whether a user have permission to any of the actions( index,create,update).

something like if we check Yii::app()->user->checkAccess(‘Category’) ; should return true,because user have access one of the operation it has.

I don’t know if this is what are you looking for, but you can set the permission of the users’ actions in the “accessRules” method. For example:




	public function accessRules()

	{

		return array(

			array('allow',

				'actions'=>array('index','view','captcha','search'),

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

			),

			array('allow',

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

			),

			array('allow',

				'actions' => array('create', 'update', 'delete', 'admin', 'categoriesByLanguage', 'suggestTags', 'getMaxId'), 

				'roles'=> array('author', 'editor', 'publisher'),

			),

			array('deny',

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

			),

		);

	}