-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.rules.json
More file actions
47 lines (47 loc) · 1.03 KB
/
database.rules.json
File metadata and controls
47 lines (47 loc) · 1.03 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
47
{
"rules": {
"drafts": {
".read": true,
"$draft": {
"order": {
".write": "root.child('admins').child(auth.uid).exists()"
},
"picks": {
".write": "auth != null"
}
}
},
"users": {
".read": true,
"$uid": {
".write": "$uid === auth.uid"
}
},
"watchlists": {
"$draft": {
"$uid": {
".read": "$uid === auth.uid",
".write": "$uid === auth.uid"
}
}
},
"trades": {
"$draft": {
"$trade": {
".write": "newData.child('receivingTeam').val() === auth.uid || newData.child('givingTeam').val() === auth.uid",
".read": "data.child('receivingTeam').val() === auth.uid || data.child('givingTeam').val() === auth.uid || data.child('status').val() === 'ACCEPTED'"
}
}
},
"tradesUsersPivot": {
"$draft": {
"$uid": {
".read": "$uid === auth.uid"
}
}
},
"tradesAccepted": {
".read": true
}
}
}