0

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

SaidbakR
  • 13,303
  • 20
  • 101
  • 195
Saba
  • 115
  • 1
  • 15

3 Answers3

1

In yii2 for manage the proces for verifying that a user has enough permission to do somethingthere there are ACF and RBAC

ACF Access Control Filter is a simple authorization method implemented and is best used by applications that only need some simple access control.

RBAC Role-Based Access Control provides a powerful centralized access control yet simple to mnanage.

Yii implements a General Hierarchical RBAC, following the NIST RBAC model.

RBAC can be based on PHP files or directly on database table ..

you can find useful info in this guide http://www.yiiframework.com/doc-2.0/guide-security-authorization.html

ScaisEdge
  • 131,976
  • 10
  • 91
  • 107
1

Please folow yii2 starter kit for reference RBAC config. With feature RBAC with predefined guest, user, manager and administrator roles. Yii2 starter kit

dungphanxuan
  • 595
  • 5
  • 18
0

You can use user roles and give specific permissions to each of roles

Jamshid
  • 1
  • 4