-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdatabase.rules.json
More file actions
127 lines (126 loc) · 3.43 KB
/
database.rules.json
File metadata and controls
127 lines (126 loc) · 3.43 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
{
"rules": {
".write": "auth.uid == 'G5YXbwCzNSg2HwnU6SEgpCwpNsc2'",
".read":"auth.uid == 'G5YXbwCzNSg2HwnU6SEgpCwpNsc2'",
"ageClasses" : {
".write":"auth.uid != null",
".read": "auth.uid != null"
},
"candidateAthleteNames" : {
".write":"auth.uid != null",
".read": "auth.uid != null"
},
"candidateLocationNames" : {
".write":"auth.uid != null",
".read": "auth.uid != null"
},
"candidateMoveNames" : {
".write":"auth.uid != null",
".read": "auth.uid != null"
},
"candidateTournamentNames" : {
".write":"auth.uid != null",
".read": "auth.uid != null"
},
"collections" : {
".write":"auth.uid != null",
".read": "auth.uid != null"
},
"customers" : {
".read": "auth.uid != null &&
query.orderByChild == 'stripeCustomerId' && query.equalTo == auth.uid",
".write": "auth.uid != null &&
query.orderByChild == 'stripeCustomerId' &&
query.equalTo == auth.uid"
},
"events" : {
".write":"auth.uid != null",
".read": "auth.uid != null"
},
"feedback" : {
".write":"auth.uid == 'G5YXbwCzNSg2HwnU6SEgpCwpNsc2'",
".read": "auth.uid == 'G5YXbwCzNSg2HwnU6SEgpCwpNsc2'"
},
"giRanks" : {
".write":"auth.uid != null",
".read": "true"
},
"gymAffiliations" : {
".write":"auth.uid != null",
".read": "true"
},
"individualNames" : {
".write":"auth.uid != null",
".read": "true"
},
"locations" : {
".write":"auth.uid != null",
".read": "true"
},
"noGiRanks" : {
".write":"auth.uid != null",
".read": "true"
},
"tournamentNames" : {
".write":"auth.uid != null",
".read": "true"
},
"users" : {
"$user_id":{
".write":"true",
//TODO add read and write here?
"reputationPoints":{
".read": "auth.uid != null",
".write": "auth.uid != null" //TODO check a parent variable
},
"reputationLog":{
".read": "auth.uid != null", //TODO check a parent variable
".write": "auth.uid != null" //TODO check a parent variable
}
},
".read": "auth.uid != null", //TODO && child uid should match auth.uid
".write": "auth.uid != null", //TODO && child uid should match auth.uid
".indexOn": [
"uid",
"email"
]
},
"weightClasses" : {
".write":"auth.uid != null",
".read": "auth.uid != null"
},
"login":{
".write":true,
".read": true
},
"videos":{
".write":"auth.uid !=null",
".read": "auth.uid!=null"
},
"matches": {
".indexOn": [
"matchDeets/videoUrl",
"matchDeets/athlete1Name",
"matchDeets/athlete2Name"
],
"$matchId": {
".indexOn": [
"/matchCreated",
"/matchDeets",
"matchDeets/videoUrl",
"/matchDeets/annotationRating",
"/matchDeets/athlete1Name",
"/matchDeets/athlete2Name"
],
"matchDeets": {
".indexOn": [
"videoUrl",
"annotationRating",
"athlete1Name",
"athlete2Name"
]
}
}
}
}
}