RBAC module that allows you to edit roles, permissions and rules using the web interface.
The preferred way to install this extension is through composer.
$ composer require yii2cmf/yii2-rbac-module
or add
"yii2cmf/yii2-rbac-module": "*"
to the require section of your composer.json file.
In config/web.php
'modules' => [
...
'rbac' => [
'class' => 'app\modules\rbac\Module',
// Excluded Modules
'exclude' => ['gii', 'debug'],
// Set rules path
'rules' => ['app\modules\rbac\rules', 'app\commands', '...'],
],
...
];
php yii migrate/up --migrationPath=@vendor/yii2cmf/yii2-rbac-module/migrations