H
H
Hy_ok2016-12-12 05:25:57
Yii
Hy_ok, 2016-12-12 05:25:57

How to make multiple cabinets in yii2 advanced?

There is such a task, there should be several users on the application, not counting the admin, how to make several personal accounts, that is, there is an ordinary user who only views the information, there is a dispatcher, and there is a "foreman") how to make them)
I understand what we are doing in the database the "role" field for the user table, checking for roles, and so on, but I can't figure out how to separate these cabinets (tell me how to do it or which way to dig) thanks in advance)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2016-12-12
@hy_ok

Goodnight.
To start this article .
Then look at the same blog, there is more information.
Well, read the official documentation.

A
Andrew, 2016-12-12
@mhthnz

You probably need to do one cabinet, but with functionality dependent on the user's role, so as not to duplicate the authentication code. Well, then you set access rights based on controller actions, or for greater convenience, you can implement them in the form of different modules, for each role, it all depends on the task.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question