🐤 Follow the commands:
- Check that the component
authManager
has been configured. - Add to your composer.json
"githubjeka/yii2-gui-rbac": "*"
- Run
composer update
- If your project doesn't have to implement rbac then run
yii migrate --migrationPath=@yii/rbac/migrations/
- Add to
config/web.php
(for basic app) orcommon/config/main.php
(for advanced app)
'modules' => [
'rbac' => [
'class' => 'githubjeka\rbac\Module',
'as access' => [ // if you need to set access
'class' => 'yii\filters\AccessControl',
'rules' => [
[
'allow' => true,
'roles' => ['@'] // all auth users
],
]
]
],
],
- go to url
/index.php?r=rbac