RBAC definition rules


I’m newbie in Yii, and I have been reading information about RBAC and obviously it’s very powerful and just what I need for my purposes.

But, at this moment I have some doubts about it, I hope someone can help me.


[*]1 Where can I found documentation about the Yii Configuration parameters, for example in this case about the code to write in the main.php file in case I select the CPhpAuthManager or more parameters for the autManager and the CDbAuthManager.





[*]2 Where should I put the php code that defines the RBAC tree relations? I understand if I select the CPhpAuthManager class I should define a php file where write it, but in case the CDBAuthManger it should be executed once and after it should be store in the DB. But how can I execute it?


Thank you very much, maybe some of this questions are solved in the documentation, but I didn’t found.



Someone can print some RBAC example please. Thanks in advance.



To use CDbAuthManager you should have this piece of code which creates all operations, tasks, roles and users and links them to eachother. You can do this by creating an action in your default controller and run that action by going to that url.

To have more control over things, you might want to look at some of the available extensions like SRBAC.

Thank you.