Difference between #12 and #13 of
How to setup RBAC with a php file

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',
[...]
24 4
21 followers
Viewed: 114 196 times
Version: 1.1
Category: How-tos
Written by: bettor
Last updated by: Stageline
Created on: Feb 7, 2010
Last updated: 12 years ago
Update Article

Revisions

View all history