Yii Framework Forum: RBAC definition rules - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

RBAC definition rules Rate Topic: -----

#1 User is offline   Kike 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 30
  • Joined: 29-April 10

Posted 13 May 2010 - 06:40 AM

Hello,

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.
    'authManager'=>array(
                'class'=>'CDbAuthManager',
                'connectionID'=>'db',
            ),


  • 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.

Regards:
Kike
0

#2 User is offline   Kike 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 30
  • Joined: 29-April 10

Posted 14 May 2010 - 11:13 AM

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

Regards:
Kike
0

#3 User is offline   Onman 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 175
  • Joined: 26-December 09
  • Location:The Netherlands

Posted 14 May 2010 - 12:06 PM

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.
0

#4 User is offline   Kike 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 30
  • Joined: 29-April 10

Posted 17 May 2010 - 04:41 PM

Thank you.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users