Answer the question
In order to leave comments, you need to log in
YII2 how to implement access control from the admin panel?
Why do all modules for YII2 assume that I have nothing more to do than to prescribe groups in each module that can do something. Advise the simplest possible module for assigning users to groups, and for groups to mono assign arbitrary actions in different modules
'access' => [
'class' => AccessControl::className(),
'rules' => [
[
'actions' => ['admin', 'create', 'update', 'delete'],
'allow' => true,
'roles' => ['@']
],
[
'actions' => ['index',
'roles' => ['@', '?']
],
]
]
Answer the question
In order to leave comments, you need to log in
yii2 has RBAC built in, why not use it: wiki.it-wiki.org.ua/doku.php/yii2:rbac
https://github.com/mdmsoft/yii2-admin
Module/component according to your requirements.
Yes, and I often use it myself, I have no complaints, everything is very conveniently done visually through the admin panel. Asterisks * help to give the right to the entire module, however, you will figure it out yourself, everything is quite simple.
Another option:
https://pack-develop.info/ru/product/3
https://pack-develop.info/ru/product/5
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question