forked from SwipesForScience/SwipesForScience
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.rules.json
More file actions
42 lines (40 loc) · 1.11 KB
/
database.rules.json
File metadata and controls
42 lines (40 loc) · 1.11 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
{
"rules": {
"users": {
".read": true,
"$uid": {
".read": true,
".write": "auth.uid == $uid"
}
},
"usernames": {
".read": true,
"$username": {
".write": "auth !== null && !data.exists()"
}
},
"games": {
"$gameId": {
".read": "root.child('games').child($gameId).child('userId').val() === auth.uid",
".write": "root.child('users').child(auth.uid).child('currentGameId').val() === $gameId"
}
},
"samples": {
".indexOn": ["totalSeenCount", "averageVote"],
".read": true,
".write": "auth !== null && data.exists()"
},
"userSeenSamples": {
"$uid": {
".read":"$uid === auth.uid",
".write": "$uid === auth.uid"
}
},
"votes": {
".read": true,
"$uid": {
".write": "!data.exists()"
}
}
}
}