34k+
News
Guide
API
Wiki
Forum
Community
Places
Members
Hall of Fame
Badges
More
Learn
Books
Resources
Develop
Download Yii
Extensions
Report an Issue
Report a Security Issue
Contribute to Yii
Donate
About
Release Cycle
License
Team
Official Logos and Design
Login
How to setup RBAC with a php file
Comparing
#6
with
#7
Revision #7 was created by
SpikyJT
on Nov 16, 2010, 8:31:45 PM.
corrected 2 syntax errors in auth.php array code: } on 3rd last line should have been ). Should have finished with ; not ,
« Previous (#6)
Next (#8) »
Content
[...]
array (
'type'=>CAuthItem::TYPE_ROLE,
'description'=>'Can read a post and post a comment',
'children'=>array(
'reader','commentor',
}
)
, ), )
,
;
```
The above code declares 3 different types of roles:
1 - reader - this type of role can only read a post but not post any comments
[...]