I need to limit access to Meeting objects stored in Firestore to specific user ids (meeting participants).
Meeting example:
{
name: "Topic 1";
participantsIds : [
"0YClg4mgljK8m16znDrW",
"xFRCam5joc3nDW5jHWT5"
];
}
To load meetings from Firestore for specific participant I can easily use where query with “array-contains” operator.
How to write Firestore security rule to prevent read for users which are not meeting participants (not in participantsIds array)?
Is there a better approach to store participants on meeting and easily query and write security rules?