-
Notifications
You must be signed in to change notification settings - Fork 0
/
rules.txt
30 lines (29 loc) · 979 Bytes
/
rules.txt
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
{
"rules": {
".read": "auth != null",
".write": "auth != null",
"game": {
".read": "auth != null",
".write": "auth.uid != null
&& data.child('board').val().length == 16
&& data.child('correct').val().length == 16",
"correct": { ".validate": "newData.isString()"},
"board": { ".validate": "newData.isString()" },
"turnId": { ".validate": "newData.isString()" },
"counter": { ".validate": "newData.isNumber()" },
"card1": { ".validate": "newData.isNumber()" },
"card2": { ".validate": "newData.isNumber()" },
"$other" :{".validate": false}
},
"players": {
"$uid": {
".write": "auth != null && auth.uid == $uid",
"id": {".validate": "newData.isString()" },
"name": {".validate": "newData.isString()" },
"points": { ".validate": "newData.isNumber()" },
"$other": { ".validate": false }
}
},
"$others": {".validate": false}
}
}