iam using Yii-Rights and i want to hide all links on a page depending on authority of user on this links.
for example :
array('label'=>'Assign Tasks', 'url'=>array('/AssignedTask/admin'),'visible'=> Yii::app()->user->checkAccess('AssignedTask.Admin')
but its not working.
tell me how to fix it.
thanks in advance.
Doesn’t checkAccess() take a role as argument?
Dear waitforit thanks for reply .
but kindly explain how? i meant to say give some example.
Yii::app()->User->Checkaccess(‘controller.action’) is solved.
their is mistake in my UserIdentity Class where i am assigning username in
instead of user id.
simply replacing username with user id my problem is solve now it work properly.