Yii2 And Rbac

Hello!

I can not understand how use RBAC in Yii2.

I have 2 user type: admin and user. Type of user i store in DB.

How:

  1. create roles and use this role in controller.

  2. check user role in code

  3. Assign role with user after auth

Please, do not write links as answer.

https://github.com/yiisoft/yii2/blob/master/docs/guide/authorization.md

The Online Docs are outdated and cannot build offline from latest.

duh! :unsure:

Did you do already the Authentification part ?

Use this link for the definitive guide for Yii2 (with navigation and search ability).