-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebase.rules
More file actions
41 lines (41 loc) · 1.02 KB
/
Copy pathfirebase.rules
File metadata and controls
41 lines (41 loc) · 1.02 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
{
"rules": {
"Rooms": {
".read": "auth != null",
".indexOn": ["userId", "price"],
"": {
".write": "auth != null && (data.child('userId').val() === auth.uid || !data.exists())",
".validate": "newData.hasChildren(['roomName', 'price', 'userId']) && newData.child('price').isString()"
}
},
"Users": {
"": {
".read": " === auth.uid",
".write": " === auth.uid",
"favorites": {
"": {
".read": " === auth.uid",
".write": " === auth.uid"
}
}
}
},
"chats": {
"": {
".read": "auth != null && .contains(auth.uid)",
".write": "auth != null && .contains(auth.uid)",
"messages": {
"": {
".validate": "newData.hasChildren(['message', 'senderId', 'timestamp']) && newData.child('senderId').val() === auth.uid"
}
}
}
},
"inbox": {
"": {
".read": " === auth.uid",
".write": " === auth.uid"
}
}
}
}