forked from TestRunnerSRL/lttp-tracker
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdatabase.rules.json
More file actions
71 lines (71 loc) · 2.58 KB
/
database.rules.json
File metadata and controls
71 lines (71 loc) · 2.58 KB
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
64
65
66
67
68
69
70
71
{
"rules": {
"games": {
"$gameid": {
".write": "(!data.child('owner').exists() && newData.child('owner').val() === auth.uid) || (!newData.exists() && data.child('owner').val() === auth.uid)",
".validate": "!$gameid.contains('.') && !$gameid.contains('/') && !$gameid.contains('\\\\') && (!newData.exists() || data.child('owner').exists() || newData.child('owner').exists())",
"owner": {
".read": "true",
".validate": "newData.parent().child('passcode').exists()"
},
"passcode": {
".read": "auth.uid === data.parent().child('owner').val()",
".write": "auth.uid == data.parent().child('owner').val()",
".validate": "newData.isString() && newData.val().length >= 1"
},
"editors": {
".read": "auth.uid === data.parent().child('owner').val()",
".write": "auth.uid === data.parent().child('owner').val()",
"$editor_uid": {
".read": "auth.uid === $editor_uid",
".write": "auth.uid === $editor_uid && newData.val() === data.parent().parent().child('passcode').val()"
}
},
"items": {
".read": "true",
".write": "data.parent().child('editors').child(auth.uid).exists()"
},
"dungeonchests": {
".read": "true",
".write": "data.parent().child('editors').child(auth.uid).exists()"
},
"bigkeys": {
".read": "true",
".write": "data.parent().child('editors').child(auth.uid).exists()"
},
"smallkeys": {
".read": "true",
".write": "data.parent().child('editors').child(auth.uid).exists()"
},
"dungeonbeaten": {
".read": "true",
".write": "data.parent().child('editors').child(auth.uid).exists()"
},
"prizes": {
".read": "true",
".write": "data.parent().child('editors').child(auth.uid).exists()"
},
"medallions": {
".read": "true",
".write": "data.parent().child('editors').child(auth.uid).exists()"
},
"chestsopened": {
".read": "true",
".write": "data.parent().child('editors').child(auth.uid).exists()"
},
"timer": {
".read": "true",
".write": "data.parent().child('editors').child(auth.uid).exists()"
},
"config": {
".read": "true",
".write": "data.parent().child('editors').child(auth.uid).exists()"
},
"$other": {
".read": "false",
".write": "false"
}
}
}
}
}