Difference between
#6 and
#7 of
Simple RBAC
Revision #7 has been created by koenHuybrechts on Jun 11, 2012, 1:02:35 PM with the memo:
checkAcces > checkAccess (Typo)
« previous (#6) next (#8) »
Changes
Title
unchanged
Simple RBAC
Category
unchanged
Tutorials
Yii version
unchanged
Tags
unchanged
Simple RBAC, Role based access control, roles, Authentication, Role based menu
Content
changed
[...]
```php
<?php
$user = Yii::app()->user; // just a convenience to shorten expressions
$this->widget('zii.widgets.CMenu',array(
'items'=>array(
array('label'=>'Users', 'url'=>array('/manageUser/admin'), 'visible'=>$user->checkAccess('staff')),
array('label'=>'Your Ideas', 'url'=>array('/userarea/ideaList'), 'visible'=>$user->checkAcces
s('normal')),
array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>$user->isGuest),
array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!$user->isGuest)
),
));
?>[...]