-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.default.rules.json
More file actions
89 lines (87 loc) · 2.23 KB
/
database.default.rules.json
File metadata and controls
89 lines (87 loc) · 2.23 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
{
"rules": {
"auth_requests" : {
"$request_id": {
".read": true,
".write": "!data.exists() || !newData.exists()"
}
},
"user_settings": {
"$user_id": {
".write": "$user_id == auth.uid",
".read": "$user_id == auth.uid",
"discord": {
".validate": "newData.isString() && (newData.val().matches(/^https:\\/\\/discord.com\\/api\\//) || newData.val() == '')"
},
"web_hook": {
".validate": "newData.isString() && (newData.val().matches(/^https?:\\/\\//) || newData.val() == '')"
},
"email": {
".validate": "newData.isString() && (true || newData.val() == '')"
},
"web_push": {
".validate": "newData.hasChildren(['endpoint', 'keys']) && newData.child('keys').hasChildren()"
},
"subscriptions": {
"$semester": {
"$sub_name": {
".validate": true
}
}
},
"paid_plan": {
"$semester": {
".write": false
}
},
"$other": {
".validate": false
}
}
},
"section_subscriptions": {
"$semester": {
"$course": {
"$section": {
"$user_id": {
".write": "$user_id == auth.uid",
".read": "$user_id == auth.uid",
".validate": "newData.hasChildren([])"
}
}
}
}
},
"department_subscriptions": {
"$semester": {
"$department": {
"$user_id": {
".write": "$user_id == auth.uid",
".read": "$user_id == auth.uid",
".validate": "newData.hasChildren([])"
}
}
}
},
"course_subscriptions": {
"$semester": {
"$course": {
"$user_id": {
".write": "$user_id == auth.uid",
".read": "$user_id == auth.uid",
".validate": "newData.hasChildren([])"
}
}
}
},
"everything_subscriptions": {
"$semester": {
"$user_id": {
".write": "$user_id == auth.uid",
".read": "$user_id == auth.uid",
".validate": "newData.hasChildren([])"
}
}
}
}
}