Questions tagged [yii2-rbac]

Role-Based Access Control (RBAC) provides a simple yet powerful centralized access control.

Please refer to the Wikipedia for details about comparing RBAC with other more traditional access control schemes.

Yii implements a General Hierarchical RBAC, following the NIST RBAC model. It provides the RBAC functionality through the authManager application component.

42 questions
0
votes
1 answer

RBAC tables in yii2

How to create permissions, roles and rules in yii2 using gii? How to assign roles in yii2? How to implement all these using below 4 tables? auth_item auth_item_child auth_assignment auth_rule Consider the case: There are two users Admin and…
Questions
  • 69
  • 1
  • 12
0
votes
0 answers

Can't apply RBAC command

When I execute the command yii migrate --migrationPath=@yii/rbac/migrations inside the main folder to activate the RBAC following the guide in the here and returns the following error "Exception 'ReflectionException' with message "Class db does not…
changez
  • 77
  • 2
  • 11
0
votes
2 answers

Auth assignment database call yii2

I am using Yii2 and using the yii\rbac\DbManager for auth assignment. I was looking at the logs to see where all the database calls are coming from and this query SELECT `b`.* FROM `auth_assignment` `a`, `auth_item` `b` WHERE…
George Hallam
  • 51
  • 1
  • 4
0
votes
2 answers

User roles in Yii2, from DB value

This might sound duplicate at the first place but available answers lack clarity and doesnt solve my problem. i have a database list of users, one tuple would look something like the following. [ 'id' => '131', 'username' => 'mat', …
K3V
  • 282
  • 6
  • 17
0
votes
3 answers

Yii2 suggestion for two or more users

I'm beginner to yii2, I want to FOLLOW a suggermento Which way to create two users with different capabilities. Can you give me an example of how to create two types of users? Thanks so much
Saba
  • 115
  • 1
  • 15
0
votes
2 answers

How can I implement yii2-rbac in frontend and backend separate?

I want to implement rbac in frontend and backend separate. I have a table for admins in backend and admin users work with this table. Also a table for normal users and they work with this table (for login, signup etc). In the rbac related table…
mojtaba.sln
  • 51
  • 1
  • 7
0
votes
1 answer

Yii2 Error: Class dektrium\rbac\Module does not exist

I have just updated my composer and after that when i run my Yii2 application i got this error "Class dektrium\rbac\Module does not exist" i am using rbac in my application. I checked desctrium\rabc directory there is no file with Module class.…
Ninja Turtle
  • 1,293
  • 2
  • 24
  • 50
0
votes
2 answers

Yii2 controller not allowing another action to guest user

I'm using Yii2 Advance application. I've SiteController.php where I've actions like login, logout & index. Here login is for Guest users and index & logout for logged-in users. Now I've created one more action called reset to provide Forgot Password…
J.K.A.
  • 7,272
  • 25
  • 94
  • 163
0
votes
1 answer

Yii2 roles and users

Can I statically define roles in authManager (in defaultRoles array in config) and assign them to users so behavior rules define access to actions? As i have certain roles, I don't want to use auth_assignment and auth_item and ... Assuming I create…
Mehrdad
  • 51
  • 1
  • 5
0
votes
1 answer

Use customer table for role based access control instead of user in yii2

I want to use table login_info instead of table user in yii2 to create member activities in frontend part that are not in the backend part. Also I have roles at the table login_info like :health-post, hospital, fchv, etc, not can be managed from…
Bishwa Timilsina
  • 1,053
  • 9
  • 11
-1
votes
2 answers

installing yii2-rbac error You have wrong authManager configuration

I install yii2-rbac following this site page: https://github.com/dektrium/yii2-rbac/blob/master/docs/installation.md . I do it second time. First time I have done, but I wrote in the config/web.php file: 'modules' => [ 'user' => [ …
-1
votes
1 answer

YII2 Associations examples or via() or viaTable() example

HI All, This example will help you how to get products details of customer using restful API call,
1 2
3