Answer the question
In order to leave comments, you need to log in
How to restrict access to controllers in general, and not individual actions in yii2?
There are several roles and ~8 menu items (added to layouts/main.php) for which a specific controller is responsible. How not to show unavailable menu items? for example, the guest will be immediately given a login form and he will not see anything else, 1 roles will be available 1 and 2 menu items ... roughly so.
basic template
Answer the question
In order to leave comments, you need to log in
Dig towards RBAC and business logic for roles, done through the web user method:
Yii::app()->user->checkaccess('....');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question