-
Notifications
You must be signed in to change notification settings - Fork 1
/
database.json
executable file
·66 lines (66 loc) · 2.26 KB
/
database.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
"rules": {
"netlify-subdomain": {
".validate": "newData.isString()",
".read": "root.child('tokens/'+auth.uid).isString()"
},
"tasks": {
"$task": {
".read": "root.child('tokens/'+auth.uid).isString() && data.child('createdBy').val() === auth.uid",
".validate": "newData.child('type').isString()",
"status": {
".validate": "newData.val() === 'queue' || newData.val() === 'done' || newData.val() === 'error' || newData.val() === 'skipped'"
},
"createdBy": {".validate": "root.child('tokens/'+newData.val()).isString()"},
"createdAt": {".validate": "newData.isNumber()"},
"updatedAt": {".validate": "newData.isNumber()"}
}
},
"invite": {
".read": "root.child('tokens/'+auth.uid).isString()",
"$sha256": {
".read": "true",
".write": "root.child('tokens/'+auth.uid).isString() && $sha256.length === 64 && $sha256 === $sha256.toLowerCase()",
".validate": "!data.exists() && newData.hasChildren(['email'])",
"email": {
".validate": "newData.isString() && newData.val().contains('@') && newData.val() === newData.val().toLowerCase()"
},
"full_name": {
".validate": "newData.isString()"
},
"$other": {".validate": false}
}
},
"update": {
".read": "root.child('tokens/'+auth.uid).isString()",
"$push": {
".write": "root.child('tokens/'+auth.uid).isString() && newData.child('user_id').isString()",
"user_id": {
".validate": "newData.isString()"
},
"email": {
".validate": "newData.isString() && newData.val().contains('@') && newData.val() === newData.val().toLowerCase()"
},
"full_name": {
".validate": "newData.isString()"
},
"$other": {".validate": false}
}
},
"retire": {
".read": "root.child('tokens/'+auth.uid).isString()",
"$push": {
".write": "root.child('tokens/'+auth.uid).isString()",
".validate": "newData.child('user_id').isString()",
"user_id": {
".validate": "newData.isString()"
}
}
},
"tokens": {
"$uid": {
".validate": "newData.isString() || !newData.exists()"
}
}
}
}