Revision #6 has been created by François Gannaz on Apr 30, 2012, 3:54:13 PM with the memo:
Fixed 2 links
« previous (#5) next (#7) »
Simple RBAC, Role based access control, roles, Authentication, Role based menu
[CWebUser::checkAccess()] usually connects to the authorization system loaded in Yii.
Here we are replacing it with a simple system that just deals with roles instead of the hierarchical system defined by the derivatives of [CAuthManager]. See the official tutorial, [
](Role-Based Access Control) for details.
## Checking permissions: usage
[...]Here the "admin" action of the controller has restricted access: only those with roles "staff" or "devel" can access it.
As described in the API doc of [
](CAccessRule), the "roles" attribute will in fact call `Yii::app()->user->checkAccess()`.
### How to display a different menu according to roles
You can also use just one menu for all users based upon different roles. for example