M
M
Maxim Timofeev2016-06-04 18:58:07
Yii
Maxim Timofeev, 2016-06-04 18:58:07

Which CRUD to choose for standard db RBAC in YII2?

There is a site in which RBAC is already implemented, but there is no CRUD for it. The role change is implemented of course, but the creation of new roles, rules, etc. no. Did it by hand.
Now I’m thinking about attaching CRUD to all this, but I’m somehow too lazy to write, it’s useful to look for ready-made solutions, there are a lot of them, but they all implement either some of the features or are finished, something of their own that doesn’t fit.
Does anyone know a ready-made solution within the framework of the standard usage described in the YII2 docs.
I did it on the docks and on this wonderful article, if anyone is interested wiki.it-wiki.org.ua/doku.php/yii2:rbac
And an extra question. Who parsed yii \ rbac \ DbManager piece by piece, tell me, except for creating entries in the database, it does not create classes, etc. In fact, you can simply use gii to generate rbac for its tables and primarafet a little? That is, is it possible to work directly with the database, and not through the yii\rbac\DbManager methods for adding and editing?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
devian3000, 2016-06-07
@devian3000

Yes, you can work directly with the database.
There is a logic for sampling, for adding, you can do anything if you follow the links.
To manage roles, rules, etc. I think that this functionality is redundant IMHO.
But if necessary, it is better to write for the task yourself. It will be easier than customizing those that are.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question