When using .read
with a true rule on the Users node, I give access to some authenticated user read every user listed on that tree. I need just some of then.
I need some rule that works like a filter. So on getting User/ path, this authenticated user will get an users array of only those that have permission path like this $uid > permission > auth.uid = true
.
{
"rules": {
"Users" : {
".read": true,
"$uid" : {
".read" : "(auth != null && auth.uid === $uid) || root.child('Users/'+ $uid+'/permission/'+ auth.uid).val() == true",
".write" : false
}
},
}
}