In the Flexible Sync Permissions Guide, the Restricted News Feed use case uses the $in operator to allow permissions to any value in an array:
But in what seems to me to be an analogous scenario in the Dynamic Collaboration use case, where I was expecting to also see the $in operator, it is not used:
So I can better understand how this all works, can someone explain the distinction between the rule constructions of these two use cases? Thanks!
The main difference between those two constructions is that in the Restricted News Feed example, the docs mention that the intention of this permission is to include documents whose authors have IDs in the user’s subscribedTo array. While the Dynamic Collaboration refers to a set of permissions where the user **may edit the document if the document’s collaborators array field contains their ID.
In the Restricted News Feed section, the subject of the query is a string field (owner_id), checked against an array.
In the Dynamic Collaboration, the subject is an array field (collaborators) checked against a string.