L
L
Lev K2016-06-11 13:17:04
Yii
Lev K, 2016-06-11 13:17:04

How to create new roles and read them from database in yii2 admin panel, rbac?

Hello!
I have basic yii2 template.
I want to organize an admin panel, I created a user table using migration.
I also made an rbac migration for dbmanager.
Manually made several roles in the database. Created users (generated password hash and manually inserted into the database). Everything seems to be working, I played around with access in controllers.
Now I want to make an admin panel for adding new users and creating / reading roles from the database. Whether it is possible to create models for DbManager'a tables by means of gii and in general whether these models are necessary?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2016-06-11
@webinar

Very good article wiki.it-wiki.org.ua/doku.php/yii2:rbac
If used through the Yii::$app->authManager; then separate models are not needed. If you write your own methods, you will need them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question