forked from ReactJSResources/react-webpack-babel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.rules.json
More file actions
34 lines (33 loc) · 1.44 KB
/
database.rules.json
File metadata and controls
34 lines (33 loc) · 1.44 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
{
"rules" : {
".read" : "auth != null && data.child('users').child(auth.uid).child('admin').val() == true",
".write" : "auth != null && data.child('users').child(auth.uid).child('admin').val() == true",
"users" : {
".read" : "auth != null",
".write" : "auth != null",
".indexOn" : ["email"]
},
"grids" : {
"$grid" : {
".read" : "auth != null && (data.child('users').child(auth.uid).exists() || !data.exists() || data.child('public').val() == true)",
".write" : "auth != null && (data.child('users').child(auth.uid).exists() || !data.exists() || data.child('public').val() == true)",
".validate" : "newData.hasChildren()",
"numCols" : {
".validate" : "newData.val() > 0"
},
"numRows" : {
".validate" : "newData.val() > 0"
},
"name" : {},
"users" : {},
"public" : {},
"$row" : {
".validate" : "$row.matches(/^(r)[0-9]+$/) && newData.hasChildren()",
"$col" : {
".validate" : "$col.matches(/^(c)[0-9]+$/) && newData.val().matches(/^(rgb\\()(((0|1)?[0-9]{1,2}|2[0-4][0-9]|25[0-5]),( )?){2}((0|1)?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\\)$/)"
}
}
}
}
}
}