I have three data types: User
, Entity
, and Brand Kit
.
A User
can can belong to many Entity
's, so I gave it a list of Entity's
field.
The Brand Kit
can also belong to many Entity'
s, so I gave it a list of Entity's
field.
Then in Privacy Rules I thought I could create a rule on the Brand Kit
such as: Current User's Entity contains one of This Brand Kit's Entities
.
But the Privacy Rules do not allow that pattern.
If one of those things was a single field instead of a list I could say Current User's Entity contains This Brand Kit's Entity
. That would work for the Privacy Rules, but it also breaks the functionality of my app because now a Brand Kit
can only belong to a single Entity
when in fact it should belong to many.
How do I add a Privacy Rule on the Brand Kit
so that only Users
with a matching Entity
can see it?