Created
September 6, 2017 07:39
-
-
Save balazsorban44/52c2858aa10f6269c7a9b3c0cfa247d5 to your computer and use it in GitHub Desktop.
Firebase sample code for question on Stack Overflow
This file contains hidden or 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
Database: | |
"root": { | |
"reservations": { | |
"-59a9ac14cf84dddb10852e65": { | |
"details": { | |
"message": "in labore velit quis commodo.", | |
"children": 0, | |
"adults": 5, | |
"tel": "+36-96-055-6277", | |
"email": "[email protected]", | |
"name": "Rivas Knox" | |
}, | |
"public": { | |
"handled": false, | |
"to": "2017-9-25", | |
"from": "2018-12-9", | |
"roomId": 2 | |
} | |
} | |
} | |
} | |
Rules: | |
"rules": { | |
"reservations": { | |
"$reservation": { | |
"public": { | |
".read": true | |
}, | |
"details": { | |
".read": "root.child('admins').hasChildren([auth.uid])" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment