haseeb2k9
(Hassebashfaq)
1
hi all,
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.
dniznick
(Dniznick)
2
Doesn’t checkAccess() take a role as argument?
haseeb2k9
(Hassebashfaq)
3
Dear waitforit thanks for reply .
but kindly explain how? i meant to say give some example.
thanks.
haseeb2k9
(Hassebashfaq)
4
[Solved]
Yii::app()->User->Checkaccess(‘controller.action’) is solved.
their is mistake in my UserIdentity Class where i am assigning username in
private $_id
instead of user id.
simply replacing username with user id my problem is solve now it work properly.