1 year ago
#302705
Imade
Firebase security rules on members of document
I am using firebase and I'm a bit confused concerning security rules.
Consider the following data structure :
{
viewable:boolean,
prop1: ...;
map : { viewable: boolean ... }
}
As you see my structure can contains properties with a nested viewable
property. I want to be able to make queries where objects with the property viewable == true returns the object with the viewable properties, but nested objects with a viewable == false are omitted from the returned results.
At the moment, I tried some security rules but objects with "viewable == false" are still in the result.
And then I saw in the documentation that firebase rules can't be used to filter nested field...
I can't use Cloud Functions either because then I won't be able to observe firestore database changes (with the snapshotChanges API).
Do you know if it is possible to achieve?
Regards
firebase
firebase-security
rule-engine
0 Answers
Your Answer