Skip to content

Commit 07ec75d

Browse files
committed
1、简化配置文件读取
2、策略模型支持多个,默认为第一个。其他扩展配置,只需要按照基础配置一样,复制一份,指定相关策略模型和适配器即可
1 parent f43144f commit 07ec75d

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

src/config/plugin/casbin/webman-permission/permission.php

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,5 @@
2424
'rules_name' => null
2525
],
2626
],
27-
// 其他扩展配置
28-
'abac' => [
29-
// 策略模型Model设置
30-
'model' => [
31-
'config_type' => 'file',
32-
'config_file_path' => config_path() . '/plugin/casbin/webman-permission/abac-model.conf',
33-
'config_text' => '',
34-
],
35-
// 适配器
36-
'adapter' => Casbin\WebmanPermission\Adapter\LaravelDatabaseAdapter::class,
37-
// 数据库设置
38-
'database' => [
39-
// 数据库连接名称,不填为默认配置
40-
'connection' => '',
41-
// 策略表名(不含表前缀)
42-
'rules_table' => 'casbin_rule',
43-
// 策略表完整名称
44-
'rules_name' => null
45-
],
46-
],
27+
// 其他扩展配置,只需要按照基础配置一样,复制一份,指定相关策略模型和适配器即可
4728
];

0 commit comments

Comments
 (0)