yadjet / yii2-rbac
The RBAC GUI for the Yii framework
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Language:JavaScript
Type:yii2-extension
Requires
- yiisoft/yii2: >=2.0.4
This package is auto-updated.
Last update: 2025-01-10 20:48:40 UTC
README
RBAC For Yii2
安装
composer require yadjet/yii2-rbac
配置
安装完毕后,你需要配置控制文件中的 authManager 组件属性,例如
'authManager' => [
'class' => 'yii\rbac\DbManager',
'defaultRoles' => [],
......
],
#实现访问控制 创建自己的控制器,并确保从 \yadjet\rbac\controllers\RbacController 类继承,例如:
namespace backend\controllers;
class Controller extends \yadjet\rbac\controllers\RbacController
{
public function actionIndex() {
......
}
}