-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.rules.json
More file actions
24 lines (24 loc) · 821 Bytes
/
Copy pathdatabase.rules.json
File metadata and controls
24 lines (24 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
"rules": {
"rooms": {
".read": false,
".write": false,
"$roomId": {
".read": "!root.child('/rooms/' + $roomId + '/endedAt').exists() || data.child('authorId').val() == auth.uid ",
".write": "auth != null && (!data.exists() || data.child('authorId').val() == auth.uid)",
"questions": {
".read": "!root.child('/rooms/' + $roomId + '/endedAt').exists()",
".write": false,
"$questionId":{
".read": true,
".write": "auth != null && !root.child('/rooms/' + $roomId + '/endedAt').exists() && (!data.exists() || data.child('author/id').val() == auth.uid)",
"likes": {
".read": true,
".write": "auth != null"
}
}
}
}
}
}
}