Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
roles in yii2 are conditional, access is checked through the availability of actions user->can('manager') - manager conditionally this action with a flag that this action is a role.
With a properly implemented RBAC, for example, such a Yii::$app->user->can('manager') check in the code should work.
You can also filter actions in the controller by roles through accessRules()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question