-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase.rules.json
46 lines (46 loc) · 1.63 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
{
"rules": {
"preview": {
"aa14fdd9-users": {
"$uid": {
".read": "auth != null && $uid === auth.uid",
".write": "auth != null && $uid === auth.uid"
}
},
"b6d6cc89-slogs": {
"$usertoken": {
".read": false,
".write": true
}
},
"ce471190-chats": {
"$chatroomid": {
".read": "auth !== null && ($chatroomid === 'ejs993ejiei3' || $chatroomid.contains(auth.uid))",
".write": "auth !== null && ($chatroomid === 'ejs993ejiei3' || $chatroomid.contains(auth.uid))",
".validate": "$chatroomid === 'ejs993ejiei3' || ( $chatroomid.beginsWith(auth.uid) ? ( auth.uid < $chatroomid.replace(auth.uid + ':u1:u2:', '') ) : ( $chatroomid.replace(':u1:u2:' + auth.uid, '') < auth.uid ) )"
}
}
},
"production": {
"aa14fdd9-users": {
"$uid": {
".read": "auth != null && $uid === auth.uid",
".write": "auth != null && $uid === auth.uid"
}
},
"b6d6cc89-slogs": {
"$usertoken": {
".read": false,
".write": true
}
},
"ce471190-chats": {
"$chatroomid": {
".read": "auth !== null && ($chatroomid === 'ejs993ejiei3' || $chatroomid.contains(auth.uid))",
".write": "auth !== null && ($chatroomid === 'ejs993ejiei3' || $chatroomid.contains(auth.uid))",
".validate": "$chatroomid === 'ejs993ejiei3' || ( $chatroomid.beginsWith(auth.uid) ? ( auth.uid < $chatroomid.replace(auth.uid + ':u1:u2:', '') ) : ( $chatroomid.replace(':u1:u2:' + auth.uid, '') < auth.uid ) )"
}
}
}
}
}