-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
default-roles.ts
55 lines (54 loc) · 1.43 KB
/
default-roles.ts
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
import { AuthRole } from './typings'
export const defaultUserRole = 'dev'
export const defaultAdminRole = 'admin'
export const defaultRoles: AuthRole[] = [
{
id: 'admin',
name: 'Administrator',
description:
'Administrators have full access to the workspace including adding members, creating bots and synchronizing changes.',
rules: [
{ res: '*', op: '+r+w' },
{
res: 'module.code-editor.global.configs',
op: '-r-w'
}
]
},
{
id: 'dev',
name: 'Developer',
description: 'Developers have full read/write access to bots, including flows, content, NLU and actions',
rules: [
{ res: '*', op: '+r+w' },
{ res: 'admin.*', op: '+r-w' },
{ res: 'admin.collaborators.*', op: '-r' },
{
res: 'module.code-editor.global.*',
op: '+r-w'
},
{
res: 'module.code-editor.global.configs',
op: '-r-w'
}
]
},
{
id: 'editor',
name: 'Content Editor',
description:
'Content Editors have read/write access to content and NLU, and read-only access to flows and actions.',
rules: [
{ res: '*', op: '+r' },
{ res: 'admin.collaborators.*', op: '-r' },
{ res: 'bot.flows', op: '+r-w' },
{ res: 'bot.content', op: '+r+w' },
{ res: 'module.qna', op: '+r+w' },
{ res: 'module.nlu', op: '+r+w' },
{
res: 'module.code-editor.*',
op: '-r-w'
}
]
}
]