-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Expand file tree
/
Copy pathsystem-share.ts
More file actions
45 lines (45 loc) · 995 Bytes
/
system-share.ts
File metadata and controls
45 lines (45 loc) · 995 Bytes
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
import { hasPermission } from '@/utils/permission/index'
import { ComplexPermission } from '@/utils/permission/type'
import { EditionConst, PermissionConst, RoleConst } from '@/utils/permission/data'
const share = {
is_share: () => false,
create: () =>
hasPermission(
[
RoleConst.ADMIN,
PermissionConst.SHARED_MODEL_CREATE,
],
'OR',
),
modify: () =>
hasPermission(
[
RoleConst.ADMIN,
PermissionConst.SHARED_MODEL_EDIT,
],
'OR',
),
paramSetting: () =>
hasPermission(
[
RoleConst.ADMIN,
PermissionConst.SHARED_MODEL_EDIT,
],
'OR',
),
delete: () =>
hasPermission(
[
RoleConst.ADMIN,
PermissionConst.SHARED_MODEL_DELETE,
],
'OR',
),
auth: () => false,
folderRead: () => false,
folderManage: () => false,
folderCreate: () => false,
folderEdit: () => false,
folderDelete: () => false,
}
export default share