-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdefaultConfigtion.js
More file actions
120 lines (103 loc) · 2.69 KB
/
defaultConfigtion.js
File metadata and controls
120 lines (103 loc) · 2.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
const defaultConfigObj = {
/**
* 路由前缀
*/
'routePrefix': '/',
/**
* 要使用的磁盘列表(从文件系统中选择)
*/
'diskList': ["", ""],
/**
* 默认选择的磁盘。为 null则自动选择 diskList列表中的第一个
*
*/
'leftDisk': null,
'rightDisk': null,
/**
* 磁盘的路径,为 null 则是根路径
*/
'leftPath': null,
'rightPath': null,
/**
* 图片缓存
* 设置 null 或 0 则表示不需要缓存
* 设置 number类型的值则为要缓存的分钟数
*/
// 'cache': null,
/**
* 文件管理 要显示的窗口
* 1 - 仅一个文件管理窗口
* 2 - 一个文件管理窗口和目录树
* 3 - 二个文件管理窗口
*/
// 'windowsConfig' : 2,
/**
* 上传的文件大小限制,为 null 则不限制
*/
// 'maxUploadFileSize': null,
/**
* 允许上传的文件类型,为 [] 则不限制
*/
//'allowFileTypes': [],
/**
* 文件的显示/隐藏
*/
// 'hiddenFiles' : true,
/*
* 中间件 ['web', 'auth', 'admin']
* 限制非管理员用户的访问
*/
//'middleware': ['web'],
/*
* ACL 访问控制
*/
'acl': true,
/**
* 如果用户没有权限则隐藏文件
* ACL access level = 0
*/
//'aclHideFromFM': true,
/**
* ACL 策略
*
* blacklist - 黑名单 允许读 / 写
*
* whitelist - 白名单 禁止读 / 写
*/
//'aclStrategy': 'blacklist',
/**
* ACL 规则缓存
*
* null 或者 number类型值的缓存分钟数
*/
//'aclRulesCache': null,
/***************************************************************************
* ACL rules list - used for default ACL repository (ConfigACLRepository)
*
* 1 it's user ID
* null - for not authenticated user
*
* 'disk' : 'disk-name'
*
* 'path' : 'folder-name'
* 'path' : 'folder1*' - select folder1, folder12, folder1/sub-folder, ...
* 'path' : 'folder2/*' - select folder2/sub-folder,... but not select folder2 !!!
* 'path' : 'folder-name/file-name.jpg'
* 'path' : 'folder-name/*.jpg'
*
* * - wildcard通配符
*
* access: 0 - deny, 1 - read, 2 - read/write
*/
'aclRules': [
[
//['disk' : 'public', 'path' : '/', 'access' : 2],
],
[
//['disk' : 'public', 'path' : 'images/arch*.jpg', 'access' : 2],
//['disk' : 'public', 'path' : 'files/*', 'access' : 1],
],
],
}
const defaultConfig = new Map(Object.entries(defaultConfigObj));
module.exports = defaultConfig;