I am trying to make new message objects available only to users who exist in the member dictionary stored in each message. I keep getting the expression "7:17: Invalid ==: left operand is not a number, boolean, string or zero." in .read rule:
{ "rules": { "posts" : { ".write":true, "$post" : { ".read": "data.child('members').child(auth.uid) == true" } } } }
I pass the parameter 'uid' in the token that I generate: https://www.firebase.com/docs/security/custom-login.html
The goal is to allow reading messages only by users who exist in its member array. I cannot find examples of access to nested data in the documentation for firebase, google groups or Google search queries :-(
Allowed / possible?
source share