forked from how-to-firebase/firelist-react
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.rules.json
More file actions
25 lines (24 loc) · 754 Bytes
/
database.rules.json
File metadata and controls
25 lines (24 loc) · 754 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
25
// CHALLENGE Realtime DB
// See https://firebase.google.com/docs/database/security/
// Hint: database.rules.json is just JSON
// The nodes under "rules" map to the data tree
// `$` indicates a wildcard name that matches
// A wildcard will match all otherwise-unspecified attributes in that part of the JSON
// Example: /production/userWriteable/parties/123456
// $environment == "production"
// $objectType == "parties"
// $uid == "123456"
{
"rules": {
"$environment": {
"userWriteable": {
"$objectType": {
"$uid": {
// Create a ".write" rule to verify that auth.uid equals $uid
".write": "auth.uid == $uid"
}
}
}
}
}
}