This repository was archived by the owner on May 19, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 107
Expand file tree
/
Copy pathmail.json
More file actions
46 lines (46 loc) · 1.39 KB
/
mail.json
File metadata and controls
46 lines (46 loc) · 1.39 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
{
"rules": {
"users": {
"$userid": {
"inbox": {
"$msg": {
".validate": "newData.hasChildren(['from', 'to', 'message']) && data.val() == null && auth != null && auth.uid == newData.child('from').val()",
"from": {
".validate": "newData.isString()"
},
"to": {
".validate": "newData.isString()"
},
"message": {
".validate": "newData.isString()"
},
"$other": {
".validate": "false"
},
".read": "auth != null && auth.uid == $userid",
".write": "data.val() == null || auth != null && auth.uid == $userid"
}
},
"outbox": {
"$msg": {
".validate": "newData.hasChildren(['from', 'to', 'message']) && data.val() == null && auth != null && auth.uid == newData.child('from').val()",
"from": {
".validate": "newData.isString()"
},
"to": {
".validate": "newData.isString()"
},
"message": {
".validate": "newData.isString()"
},
"$other": {
".validate": "false"
},
".read": "auth != null && auth.uid == $userid",
".write": "auth != null && auth.uid == $userid"
}
}
}
}
}
}