Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "events": {
- "08asd980kadkadslk": {
- "metadata": {
- "icon": "eject",
- "text": "something and something and something",
- "timestamp": "2017-01-17T04:58:40.567Z"
- },
- "viewers": {
- "UYUYT0CKu4gf34kpw1": true
- }
- }
- "abcdef": {
- "metadata": {
- "icon": "eject",
- "text": "This should not be returned",
- "timestamp": "2016-01-17T04:58:40.567Z"
- },
- "viewers": {
- "zyzdef": true
- }
- }
- }
- {
- "rules": {
- // ".write": "auth != null",
- "events": {
- // ".read": "auth != null",
- "$eventId": {
- "metadata" : {
- ".read": "data.parent().child('viewers').hasChild( auth.uid )"
- },
- "viewers" : {
- "$uid" : {
- ".read": "auth.uid === $uid",
- ".write": "auth.uid === $uid"
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement