-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdatabase.rules.json
More file actions
112 lines (112 loc) · 2.92 KB
/
database.rules.json
File metadata and controls
112 lines (112 loc) · 2.92 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
{
"rules": {
".read": "true",
".write": "true",
"users": {
"$uid": {
".write": "auth !== null && auth.uid === $uid",
".read": "auth !== null",
"username": {
".validate": "!root.child('usernames').child(newData.val()).exists() || root.child('usernames').child(newData.val()).val() == $uid"
},
"playlists": {
".indexOn": "dateAdded"
},
"games": {
".indexOn": "lastEdited"
},
"inProgress": {
"$gameID": {
".validate": "newData.hasChildren(['saveRef', 'gameRef'])"
}
}
}
},
"links": {
".read": "auth !== null",
".write": "auth !== null"
},
"usernames": {
".read": "true",
".write": "true"
},
"playlists": {
".read": "auth !== null",
".write": "auth !== null"
},
"savedHistory": {
"$gameID": {
".indexOn": "timestamp"
}
},
"games": {
".read": "true",
".write": "auth !== null"
},
"queue": {
"tasks": {
".indexOn": "_state",
"$taskId": {
"_state": {
".validate": "newData.isString()"
},
"_state_changed": {
".validate": "newData.isNumber() && (newData.val() === now || data.val() === newData.val())"
},
"_owner": {
".validate": "newData.isString()"
},
"_progress": {
".validate": "newData.isNumber() && newData.val() >= 0 && newData.val() <= 100"
},
"_error_details": {
"error": {
".validate": "newData.isString()"
},
"error_stack": {
".validate": "newData.isString()"
},
"previous_state": {
".validate": "newData.isString()"
},
"original_task": {
/* This space intentionally left blank, for malformed tasks */
},
"attempts": {
".validate": "newData.isNumber() && newData.val() > 0"
},
"$other": {
".validate": false
}
},
"_id": {
".validate": "newData.isString()"
}
}
},
"specs" : {
"$specId": {
".validate": "newData.hasChild('in_progress_state')",
"start_state": {
".validate": "newData.isString()"
},
"in_progress_state": {
".validate": "newData.isString()"
},
"finished_state": {
".validate": "newData.isString()"
},
"error_state": {
".validate": "newData.isString()"
},
"timeout": {
".validate": "newData.isNumber() && newData.val() > 0"
},
"$other": {
".validate": false
}
}
}
}
}
}