Yii Framework Forum: RBAC Rules - Yii Framework Forum

Jump to content

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

RBAC Rules RBAC Rules

#1 User is offline   jorge sequeira 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 80
  • Joined: 05-February 13
  • Location:PORTUGAL

Posted 16 May 2017 - 06:06 AM

Anyone knows how to implement rules in RBAC?

Table "auth_item" has a field "rule_name" and also there is a table named "auth_rule". What are these for?
Any example on how to use them?

Thank you.

PS: Please don't post about RBAC in general. I'm perfectly aware of that. I'm only interested about implementing rules and how to use auth_rule table and "rule_name" field.

Thank you again.
0

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,165
  • Joined: 17-January 09
  • Location:Russia

Posted 16 May 2017 - 05:53 PM

Rules are described in the official guide, aren't they?
Yii 2.0 Development Cookbook

Enjoying Yii? Star us at github

Support me so I work on Yii fulltime: https://www.patreon.com/samdark
0

#3 User is offline   jorge sequeira 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 80
  • Joined: 05-February 13
  • Location:PORTUGAL

Posted 17 May 2017 - 03:30 AM

View Postsamdark, on 16 May 2017 - 05:53 PM, said:

Rules are described in the official guide, aren't they?


If documentation was clear enough for me, I wouldn't ask for help in the forum. Would I?

Thanks for nothing.
0

#4 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,165
  • Joined: 17-January 09
  • Location:Russia

Posted 17 May 2017 - 06:55 AM

http://www.yiiframew...tml#using-rules
Yii 2.0 Development Cookbook

Enjoying Yii? Star us at github

Support me so I work on Yii fulltime: https://www.patreon.com/samdark
0

#5 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,165
  • Joined: 17-January 09
  • Location:Russia

Posted 17 May 2017 - 06:58 AM

"auth_rule" table contains rule names and serialized rule classes in "data". Table itself should not be managed directly but through auth manager's ->add() method.
Yii 2.0 Development Cookbook

Enjoying Yii? Star us at github

Support me so I work on Yii fulltime: https://www.patreon.com/samdark
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