L
L
lzy2021-03-29 16:02:49
Yii
lzy, 2021-03-29 16:02:49

How to create more flexible permissions for each user in yii2?

There are more than 50 employees in the system, each has its own role and rights to a specific project department, but the question arose, how to add more flexible settings?

For example, a moderator named Sergey.A when filling out the access form, the Change button, but this button is not available to another moderator named Mikhail V., there are a lot of such forms / pages and there must be unique settings for each user. How to save the permission settings for each user separately in the database and then it would be convenient to check if there is access to the front part or not?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lander, 2021-03-29
@usdglander

Generally it is called RBAC

K
Konstantin Zhikhor, 2021-03-29
@shevchenko__k

You add a separate table and model with many-to-many relationships and write down the role and user there. this will be the exception table

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question