-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdatabase.rules.json
More file actions
41 lines (38 loc) · 779 Bytes
/
database.rules.json
File metadata and controls
41 lines (38 loc) · 779 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
{
"rules": {
".read": "auth != null",
".write": "auth != null",
"users": {
"$user_id": {
".write": "$user_id === auth.uid",
".read": "$user_id === auth.uid",
"worlds": {
},
"collaborations": {
}
}
},
"worlds": {
"$world_id": {
".write": "data.child('owner').child('$user_id').val() === auth.id",
".read": "data.child('collaborators/' +auth.uid).exists() || data.child('owner').child('$user_id').val() === auth.id",
"owner": {
},
"collaborators": {
},
"metadata": {},
"object": {}
}
},
"collaborations":{
"$collaboration_id": {
"owner": {
},
"world": {
},
"collaborators": {
}
}
}
}
}