GUI manager for RABC (Role Base Access Control) Yii2. Easy to manage authorization of user ๐.
Original mdmsoft/yii2-admin
Optimized for trntv/yii2-starter-kit
The preferred way to install this extension is through composer.
Either run
php composer require sankam/yii2-rbac "*"
Or, you may add
"sankam/yii2-rbac": "*"
to the require section of your composer.json
file and execute php composer update
.
In your application config, add the path alias for this extension.
return [
...
'modules'=>[
...
'rbac' => [
'class' => 'sankam\rbac\Module',
]
],
'as access' => [
'class' => 'sankam\rbac\components\AccessControl',
'allowActions' => [
'site/error',
'sign-in/*',
]
],
...
];