-
Notifications
You must be signed in to change notification settings - Fork 1
/
database.rules.json
63 lines (63 loc) · 3.35 KB
/
database.rules.json
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
{
"rules": {
"data": {
"$uid": {
".read": "$uid == auth.uid",
".write": "$uid == auth.uid"
}
},
"groups": {
"$group_id": {
".read": "root.child('groups').child($group_id).child('settings').child('members').child(auth.uid).exists()",
"cards": {
".write": "root.child('groups').child($group_id).child('settings').child('permissions').child(root.child('groups').child($group_id).child('settings').child('members').child(auth.uid).child('role').val()).child('card').val() == true"
},
"tasks": {
".write": "root.child('groups').child($group_id).child('settings').child('permissions').child(root.child('groups').child($group_id).child('settings').child('members').child(auth.uid).child('role').val()).child('card').val() == true"
},
"settings": {
"name": {
".write": "root.child('groups').child($group_id).child('settings').child('permissions').child(root.child('groups').child($group_id).child('settings').child('members').child(auth.uid).child('role').val()).child('settings').child('name').val() == true"
},
"note": {
".write": "root.child('groups').child($group_id).child('settings').child('permissions').child(root.child('groups').child($group_id).child('settings').child('members').child(auth.uid).child('role').val()).child('settings').child('note').val() == true"
},
"subjects": {
".write": "root.child('groups').child($group_id).child('settings').child('permissions').child(root.child('groups').child($group_id).child('settings').child('members').child(auth.uid).child('role').val()).child('settings').child('subjects').val() == true"
},
"permissions": {
"admin": {
".write": "false"
},
"member": {
".write": "root.child('groups').child($group_id).child('settings').child('permissions').child(root.child('groups').child($group_id).child('settings').child('members').child(auth.uid).child('role').val()).child('settings').child('permissions').val() == true"
}
},
"members": {
".write": "root.child('groups').child($group_id).child('settings').child('permissions').child(root.child('groups').child($group_id).child('settings').child('members').child(auth.uid).child('role').val()).child('members').val() == true",
".read": "auth != null && root.child('groups').child($group_id).child('settings').child('members').child(auth.uid).exists() == true",
"$user": {
"name": { ".write": "$user == auth.uid" },
"icon": { ".write": "$user == auth.uid" },
"role": {
".write": "root.child('groups').child($group_id).child('settings').child('permissions').child(root.child('groups').child($group_id).child('settings').child('members').child(auth.uid).child('role').val()).child('members').val() == true"
}
}
},
"invites": {
".read": "root
.child('groups')
.child($group_id)
.child('settings')
.child('members')
.child(auth.uid)
.exists()",
"$inviteIndex": {
".read": "true"
}
}
}
}
}
}
}