0

Imagine the following security rules for a node called asd in Firebase database.

"asd": {
      ".write": false,
      "$eid": {
        "prop1" : {".read": false},
        "prop2" : {".read": false},
        "prop3" : {".read": true}
      }
    }

When using firebase to query the asd node, I was expecting it to return only prop3. But, in fact, it is not returning anything. And from what I read at the documentation, it seems this is acting as expected.

So, my question is, with such a database structure, how to define the rules so that when I query the database I only get prop3 back?

AL.
  • 36,815
  • 10
  • 142
  • 281
FTM
  • 1,887
  • 17
  • 34
  • Thank you for pointing out the answer @AL. – FTM Mar 10 '17 at 05:33
  • It seems I'll have to change my DB structure. Didn't want to do that, but looks like I can't escape. – FTM Mar 10 '17 at 05:33
  • Credit goes to @MatthewBerg. He's the one who found it. ;) – AL. Mar 10 '17 at 05:48
  • Thank you @MatthewBerg! And you too @AL. By the way, I added another question. If you would like to take a look: [link](http://stackoverflow.com/questions/42711176/can-i-use-wildcard-to-build-paths-when-getting-references-of-firebase-database). – FTM Mar 10 '17 at 06:04

0 Answers0