Difference between
#6 and
#8 of
Simple RBAC
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
[...]
public function accessRules()
{
return array(
array('allow',
'actions'=>array('admin'),
'roles'=>array('staff', 'devel'),
),[...]
$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)
),
));
?>[...]