-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.rules.json
More file actions
147 lines (147 loc) · 6.38 KB
/
Copy pathdatabase.rules.json
File metadata and controls
147 lines (147 loc) · 6.38 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
{
"rules": {
"admin": {
"$key1": {
".validate": "newData.isBoolean()"
},
".validate": "newData.hasChildren()",
".read": "auth != null && root.child('admin').child(auth.uid).val() == true",
".write": "auth != null && newData.parent().child('admin').child(auth.uid).val() == true"
},
"conference": {
".read": "true",
"$conf": {
".validate": "newData.hasChildren(['name', 'description', 'cfpFrom', 'cfpTo'])",
"name": {
".validate": "newData.isString()"
},
"description": {
".validate": "newData.isString()"
},
"cfpFrom": {
".validate": "newData.isNumber()"
},
"cfpTo": {
".validate": "newData.isNumber()"
},
"dateFrom": {
".validate": "newData.isNumber()"
},
"dateTo": {
".validate": "newData.isNumber()"
},
"topics": {
".validate": "newData.isString()"
},
"logo": {
".validate": "newData.isString()"
},
"url": {
".validate": "newData.isString()"
},
"instructionsUrl": {
".validate": "newData.isString()"
},
"where": {
".validate": "newData.isString()"
},
"durations": {
"$key2": {
".validate": "newData.isString()"
},
".validate": "newData.hasChildren()"
},
"$other": {
".validate": "false"
},
".read": "true",
".write": "auth != null && newData.parent().parent().child('admin').child(auth.uid).val() == true"
}
},
"secret": {
".read": "auth != null && root.child('admin').child(auth.uid).val() == true",
".write": "auth != null && newData.parent().child('admin').child(auth.uid).val() == true"
},
"profiles": {
".read": "true",
".write": "true"
},
"profile": {
".read": "auth != null && root.child('admin').child(auth.uid).val() == true",
".write": "auth != null && newData.parent().child('admin').child(auth.uid).val() == true",
"$uid": {
".validate": "newData.hasChildren()",
"bio": {
".validate": "newData.isString()"
},
"firstName": {
".validate": "newData.isString()"
},
"displayName": {
".validate": "newData.isString()"
},
"email": {
".validate": "newData.isString() && newData.val().matches(/[\\w+-]+@([\\w-]+\\.)+[\\w-]+/i)"
},
"comment": {
".validate": "newData.isString()"
},
"secret": {
"$key2": {
".validate": "newData.isString()"
},
".validate": "newData.hasChildren()"
},
"$other": {
".validate": "false"
},
".read": "auth != null && auth.uid == $uid",
".write": "auth != null && auth.uid == $uid"
}
},
"proposal": {
".read": "auth != null && root.child('admin').child(auth.uid).val() == true",
".write": "auth != null && newData.parent().child('admin').child(auth.uid).val() == true",
"$conf": {
".read": "auth != null && (auth != null && root.child('profile').child(auth.uid).val() != null && root.child('profile').child(auth.uid).child('secret').val() != null && root.child('profile').child(auth.uid).child('secret').child($conf).val() != null) && root.child('secret').child($conf).val() != null && root.child('secret').child($conf).child('reviewer').val() != null && root.child('secret').child($conf).child('reviewer').child(root.child('profile').child(auth.uid).child('secret').child($conf).val()).val() != null",
"$uid": {
".read": "auth != null && auth.uid == $uid",
".write": "newData.parent().parent().parent().child('conference').child($conf).child('cfpFrom').val() < now && newData.parent().parent().parent().child('conference').child($conf).child('cfpTo').val() > now && (auth != null && auth.uid == $uid)",
"$id": {
".validate": "newData.hasChildren(['speaker', 'title', 'abstract'])",
"speaker": {
".validate": "newData.isString()"
},
"title": {
".validate": "newData.isString()"
},
"abstract": {
".validate": "newData.isString()"
},
"duration": {
".validate": "newData.isNumber()"
},
"comment": {
".validate": "newData.isString()"
},
"$other": {
".validate": "false"
}
}
}
}
},
"review": {
"$conf": {
"$uid": {
".read": "auth != null && root.child('admin').child(auth.uid).val() == true || auth != null && (auth != null && root.child('profile').child(auth.uid).val() != null && root.child('profile').child(auth.uid).child('secret').val() != null && root.child('profile').child(auth.uid).child('secret').child($conf).val() != null) && root.child('secret').child($conf).val() != null && root.child('secret').child($conf).child('reviewer').val() != null && root.child('secret').child($conf).child('reviewer').child(root.child('profile').child(auth.uid).child('secret').child($conf).val()).val() != null && (auth != null && auth.uid == $uid)",
".write": "auth != null && newData.parent().parent().parent().child('admin').child(auth.uid).val() == true || auth != null && (auth != null && newData.parent().parent().parent().child('profile').child(auth.uid).val() != null && newData.parent().parent().parent().child('profile').child(auth.uid).child('secret').val() != null && newData.parent().parent().parent().child('profile').child(auth.uid).child('secret').child($conf).val() != null) && newData.parent().parent().parent().child('secret').child($conf).val() != null && newData.parent().parent().parent().child('secret').child($conf).child('reviewer').val() != null && newData.parent().parent().parent().child('secret').child($conf).child('reviewer').child(newData.parent().parent().parent().child('profile').child(auth.uid).child('secret').child($conf).val()).val() != null && (auth != null && auth.uid == $uid)"
}
}
},
"speaker-review": {
".read": "auth != null && root.child('admin').child(auth.uid).val() == true",
".write": "auth != null && newData.parent().child('admin').child(auth.uid).val() == true"
}
}
}