Ok after banging my head for a day I kinda got a hang of using rbac in yii. I am using rbac-manager extension. Now the problem is the bizrule defined always returns false. I have checked the values match , it is very simple operation. Following is the code :
role: lister
bizrule : return Yii::app()->user->id==$params['user']->id;
In my controller :
$user=Yii::app()->user->id;
$auth=Yii::app()->authManager;
$auth->assign('lister',$user);
$model=User::model()->findByPk($user);
$params=array('user'=>$model);
if( $this->checkAccessByValue('lister',$params) )
echo 'hello';
It always returns false. I’d really really appreciate it if someone could please help me out. i am a newbie so if is a silly mistake go easy. Please help, I am losing my mind here !