Last active
January 9, 2016 21:58
-
-
Save rockwotj/084ada5250600b4ba939 to your computer and use it in GitHub Desktop.
Firebase bolt rules for the Moviequotes App
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path /quotes { | |
write() = true; | |
read() = true; | |
} | |
path /quotes/$moviequote is Moviequote; | |
type Moviequote { | |
movie: String, | |
quote: String | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"rules": { | |
"quotes": { | |
".read": "true", | |
".write": "true", | |
"$moviequote": { | |
".validate": "newData.hasChildren(['movie', 'quote'])", | |
"movie": { | |
".validate": "newData.isString()" | |
}, | |
"quote": { | |
".validate": "newData.isString()" | |
}, | |
"$other": { | |
".validate": "false" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Generated by the following command