-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdatabase.rules.json
68 lines (63 loc) · 1.57 KB
/
database.rules.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
{
"rules": {
"admins": {
".read": "root.child('admins').hasChild(auth.uid)"
},
"whitelist": {
".read": true,
".write": "root.child('admins').hasChild(auth.uid)",
"$user_id": {
".write": "root.child('admins').hasChild(auth.uid)",
".validate": "newData.isBoolean()"
}
},
"users": {
".read": "root.child('admins').hasChild(auth.uid)",
"$user_id": {
"displayName": {
".validate": "newData.isString()"
},
"email": {
".validate": "newData.isString()"
},
"twitterUID": {
".validate": "newData.isString()"
},
"$other": {
".validate": false
}
}
},
"active_tweet_id": {
".read": true,
".write": "root.child('admins').hasChild(auth.uid) || root.child('whitelist').hasChild(auth.uid)",
".validate": "newData.isString()"
},
"deploy_commit_hash": {
".read": true,
".write": false,
".validate": "newData.isString()"
},
"tweets": {
".read": "root.child('admins').hasChild(auth.uid) || root.child('whitelist').hasChild(auth.uid)",
"$tweet_id": {
"replies": {
"$reply_id": {
"approval_status": {
".write": "root.child('admins').hasChild(auth.uid) || root.child('whitelist').hasChild(auth.uid)",
"tier1": {
".validate": "newData.val() === 'approved' || newData.val() === 'rejected' || newData.val() === 'pending'"
},
"tier2": {
".validate": "newData.val() === 'approved' || newData.val() === 'rejected' || newData.val() === 'pending'"
},
"$other": {
".validate": false
}
}
}
}
}
}
}
}