PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, January 20, 2022

[FIXED] How to update RBAC database for Yii 2

 January 20, 2022     php, yii, yii2     No comments   

Issue

I am using DbManager for RBAC. What is a good strategy for updating the RBAC database tables once they have been created? Is there a good extension that can be used to view the roles and rules and update them?


Solution

For RBAC with DbManager, (Yii2 Adevanced Template ) i use

  • In auth_permission table i use TYPE_PERMISSION for assign the permission (what i check for grant access) and TYPE_ROLE for create a application role.
  • auth_assignment table for assign the role to the user.
  • auth_item_child table for grouping the permission to a role.

For manage this a i have create a few views with gii, based on the normal RBAC table

I Hope this is useful for you



Answered By - ScaisEdge
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

1,205,009

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © 2025 PHPFixing