Revision #13 has been created by Stageline on Aug 27, 2012, 1:17:15 PM with the memo:
protected/runtime -> protected/data/auth.php
« previous (#12)
Changes
Title
unchanged
How to setup RBAC with a php file
Category
unchanged
How-tos
Yii version
unchanged
Tags
unchanged
Authentication
Content
changed
[...]
HOWEVER: since Yii rewrites the auth.php file into a form that's far more difficult to edit, it's a good idea to edit a **auth.txt** file, where you can format and comment properly, then copy it to auth.php when you're ready to try it. The first time Yii rewrites auth.php it will be apparent why you want to do this.
Declare some roles in our auth.txt file:
```php
// protected/runtimedata/auth.
txtphp
return array(
'reader' => array (
'type'=>CAuthItem::TYPE_ROLE,
'description'=>'Can only read a post',[...]