-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdatabase.rules.json
22 lines (22 loc) · 946 Bytes
/
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
{
"dispatch": {
".read": "root.child('spec').child('users').child( auth.uid ).val() === true",
"$action": {
/* ".write": "( newData.child('token').val() === root.child('triggers').child( newData.child('triggerName').val() ).child('token').val() ) || ( root.child('spec').child('users').child( auth.uid ).val() === true )" */
".write": "true"
},
".indexOn": "_state"
},
"spec": {
".read": "root.child('spec').child('users').child( auth.uid ).val() === true",
".write": "root.child('spec').child('users').child( auth.uid ).val() === true"
},
"things": {
".read": "root.child('spec').child('users').child( auth.uid ).val() === true",
".write": "root.child('spec').child('users').child( auth.uid ).val() === true"
},
"triggers": {
".read": "root.child('spec').child('users').child( auth.uid ).val() === true",
".write": "root.child('spec').child('users').child( auth.uid ).val() === true"
}
}