-
Notifications
You must be signed in to change notification settings - Fork 1
/
database.rules.json
45 lines (45 loc) · 1.03 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
{
"rules": {
"rooms": {
"$room_id": {
".read": "auth !== null",
".write": "auth !== null",
"selectedVoteOptionsKey": {
".validate": "newData.isString()"
},
"startTime": {
".validate": "newData.isNumber()"
},
"endTime": {
".validate": "newData.isNumber()"
},
"voteOptionsList": {
"$optionsId": {
"$optionId": {
".validate": "newData.isNumber()"
}
}
},
"users": {
"$uid": {
"name": {
".validate": "$uid === auth.uid && newData.isString() && newData.val().length <= 16"
},
"hasVoted": {
".validate": "$uid === auth.uid || newData.val() === false"
},
"vote": {
".validate": "$uid === auth.uid"
}
}
},
"$other": {
".validate": false
}
}
},
"$other": {
".validate": false
}
}
}