Revision #2 was created by bettor on Feb 8, 2010, 9:51:28 AM.
clarification added
Content
In this cookbook I will attempt to explain how to use the lightweight version of [Role-Based Access Control](http://www.yiiframework.com/doc/guide/topics.auth#role-based-access-control) using a php file. This version does not use database but a php file and is controlled by CPhpAuthManager class.
## Configuring the roles: ##
By default when setting up this particular type of rbac Yii will look for any defined roles in a file named auth.php and located in protected/data/auth.php
For the sake of easiness I will add an example of user rbac to the blog demo.
>Info: Yii expects to read auth.php and get an array() out of it. So we need to create auth.php and return array(); Yii also needs to write to that file when changing roles so make sure to provide enough permission access to that file needed by the system.