Skip to content

Commit

Permalink
1、简化配置文件读取
Browse files Browse the repository at this point in the history
2、策略模型支持多个,默认为第一个。其他扩展配置,只需要按照基础配置一样,复制一份,指定相关策略模型和适配器即可
  • Loading branch information
Tinywan committed Jun 1, 2022
1 parent f43144f commit 07ec75d
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions src/config/plugin/casbin/webman-permission/permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,5 @@
'rules_name' => null
],
],
// 其他扩展配置
'abac' => [
// 策略模型Model设置
'model' => [
'config_type' => 'file',
'config_file_path' => config_path() . '/plugin/casbin/webman-permission/abac-model.conf',
'config_text' => '',
],
// 适配器
'adapter' => Casbin\WebmanPermission\Adapter\LaravelDatabaseAdapter::class,
// 数据库设置
'database' => [
// 数据库连接名称,不填为默认配置
'connection' => '',
// 策略表名(不含表前缀)
'rules_table' => 'casbin_rule',
// 策略表完整名称
'rules_name' => null
],
],
// 其他扩展配置,只需要按照基础配置一样,复制一份,指定相关策略模型和适配器即可
];

0 comments on commit 07ec75d

Please sign in to comment.