-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.fga
33 lines (29 loc) · 1.05 KB
/
model.fga
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
model
schema 1.1
type user
relations
define can_create: [user]
define can_delete: [user]
define can_invite: [user]
type group
relations
define admin: [user]
define can_invite: [user] or owner or admin
define can_view: member or owner or admin
define member: [user]
define owner: [user]
type folder
relations
define can_create_file: [user, group#member] or owner or owner from parent
define can_share: [group#admin, group#owner] or owner
define owner: [user]
define parent: [folder]
define viewer: [user, user:*, group#member] or owner or can_create_file or can_create_file from parent or viewer from parent
type file
relations
define can_change_owner: owner
define can_read: [user, user:*, group#member] or owner or viewer from parent
define can_share: [user, user:*, group#member] or owner or owner from parent or can_share from parent
define can_write: [user, user:*, group#member] or owner or owner from parent or can_create_file from parent
define owner: [user]
define parent: [folder]