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->checkAcces
s('staff')), array('label'=>'Your Ideas', 'url'=>array('/userarea/ideaList'), 'visible'=>$user->checkAccess('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)
),
));
?>
[...]
33 1
43 followers
Viewed: 95 817 times
Version: 1.1
Category: Tutorials
Written by: hasanavi
Last updated by: Stageline
Created on: Apr 29, 2012
Last updated: 5 years ago
Update Article

Revisions

View all history