-
Notifications
You must be signed in to change notification settings - Fork 4
/
firebaseRules.json
104 lines (104 loc) · 2.91 KB
/
firebaseRules.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
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
{
"rules": {
"users": {
".read": "true",
"$uid": {
".write": "auth != null && auth.uid === $uid",
".indexOn": [
"statistics/numCardsCreated",
"statistics/numDecksCreated",
"statistics/numSetsCreated",
"statistics/numGamesPlayed"
],
"statistics": {
".write": "true"
}
}
},
"games": {
".read": "true",
"$key": {
".write": "!data.exists() || (auth.uid === 'ZOozOkbOlCOxrIjyJcHAVflnNh13' || auth.uid === 'XbnODr6FdwdTQPwvjM2uF1ErRTn1')"
},
".indexOn": [
"id",
"timestamp",
"players/blue",
"players/orange",
"format/set/id"
]
},
"sets": {
".read": "true",
"$key": {
".write": "auth != null && (!newData.exists() || newData.child('metadata/authorId').val() == auth.uid) && (!data.exists() || (data.child('metadata/authorId').val() == auth.uid && (!newData.exists() || data.child('metadata/isPublished').val() != true)))",
"cards": {
"$key": {
".write": "((auth.uid === 'ZOozOkbOlCOxrIjyJcHAVflnNh13' || auth.uid === 'XbnODr6FdwdTQPwvjM2uF1ErRTn1') && newData.child('originalParserV').exists())"
}
}
},
".indexOn": [
"timestamp",
"metadata/authorId",
"metadata/numDecksCreated"
]
},
"cards": {
".read": "true",
"$key": {
".write": "auth != null && ((!data.exists() || data.child('metadata/ownerId').val() == auth.uid) && (!newData.exists() || newData.child('metadata/ownerId').val() == auth.uid)) || ((auth.uid === 'ZOozOkbOlCOxrIjyJcHAVflnNh13' || auth.uid === 'XbnODr6FdwdTQPwvjM2uF1ErRTn1') && newData.child('originalParserV').exists())",
"metadata": {
"disallowInEverythingDraft": {
".write": "auth.uid === 'ZOozOkbOlCOxrIjyJcHAVflnNh13' || auth.uid === 'XbnODr6FdwdTQPwvjM2uF1ErRTn1'"
}
}
},
".indexOn": [
"metadata/ownerId",
"metadata/updated",
"metadata/source/uid"
]
},
"decks": {
".read": "true",
"$key": {
".write": "auth != null && (!newData.exists() || newData.child('authorId').val() == auth.uid) && (!data.exists() || (data.child('authorId').val() == auth.uid))"
},
".indexOn": [
"authorId",
"setId"
]
},
"reportedParseIssues": {
"$key": {
".write": "!data.exists()"
},
".indexOn": "timestamp"
},
"cardText": {
".read": "true",
"all": {
"$key": {
".write": "!data.exists()"
}
},
"byNode": {
"$type": {
"$node": {
"$key": {
".write": "!data.exists()"
}
}
}
},
"byToken": {
"$token": {
"$key": {
".write": "!data.exists()"
}
}
}
}
}
}