File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ export type Permission = UserPermission | InstallationPermission | OrganizationP
13
13
14
14
export type UserResourceType = "user" ;
15
15
16
- export type UserRelation = "self" | "container " ;
16
+ export type UserRelation = "self" | "organization" | "installation ";
17
17
18
- export type UserPermission = "read_info" | "write_info" | "suspend" ;
18
+ export type UserPermission = "read_info" | "write_info" ;
19
19
20
20
export type InstallationResourceType = "installation" ;
21
21
Original file line number Diff line number Diff line change 5
5
schema : |-
6
6
definition user {
7
7
relation self: user
8
- relation container: organization | installation
8
+
9
+ // Only ONE of the following relations is ever present for a given user (XOR)
10
+ relation organization: organization
11
+ relation installation: installation
9
12
10
13
// permissions
11
- permission read_info = self + container->member + container->owner + container->admin
12
- permission write_info = self + container->owner + container->admin
13
- permission suspend = self + container->owner + container->admin
14
+ permission read_info = self + organization->member + organization->owner + installation->admin
15
+ permission write_info = self
14
16
}
15
17
16
18
// There's only one global installation
@@ -80,7 +82,7 @@ schema: |-
80
82
relationships : |-
81
83
// we have one installation
82
84
installation:installation_0#member@user:user_0
83
- user:user_0#container @installation:installation_0
85
+ user:user_0#installation @installation:installation_0
84
86
85
87
installation:installation_0#admin@user:user_admin
86
88
You can’t perform that action at this time.
0 commit comments