Use Of Srbac

Any one help?

I have already install Srbac successfully , and I have also read srbac_guide_1.2.pdf , srbac in Wiki . But I really don’t know how to make the roles , controls , tasks , operations work in the code,can someone give me an example? And how can I build a background management to manage the users in different roles?Thank you very much!!! I am so confusing! Help!

Hello,

This is a "not-short-answer", but I have to say that iti is not complicated…

You can find the long answer in: http://www.yiiframework.com/doc/guide/1.1/en/topics.auth#role-based-access-control

A possible short answer could be: Role Based Access Control… :D kidding… Create multiple roles, created hildren tasks, and each task should have children operations… In the Yii RBAC model, you can check any of them via:


Yii::app()->user->checkAccess('myRole');

And the function will return TRUE or FALSE.

just go to path/to/application/index.php?r=srbac/authitem/frontpage.

you can manage the whole tasks, operations, roles there. after you manage the user’s roles, it will be automatically have the authorizations.

Much Thanks,robregonm and dyooolicious!

Srbac is an so exciting extension ! One just manage the roles,tasks,operations on the view and use


Yii::app()->user->checkAccess('myRole');

to use it.

Thanks you again !!! :D