I have this datatype called “Dispatch” which is a message that contains a “Money” datatype,
And when someone sends “Money” a new “Dispatch” is created. the thing is, I need to limit the access to the “Money” datatype depending on the information of “dispatch”, and that is what I am struggling with, Any solutions?
To me it simple, but maybe i am not familiar to your overall app.
Just have something, which valide current user access to money. Can be done in many wasy. Dont show money to all other privacy policy except for the one who grant access on which user hv access to money.
I simple one would be, in dispatch, add another filed as user name it like.
Acces_to_money make it a list of user .
And create a privacy rule this dispatch access to money contain current user and inside it make money visible to anyone other make it un visible l.
And simple when you have dispatch add user who should hv access to money depending on who you want.
I think I didn’t explain it well, I have a complex scenario where I need to display different info based on the relationship with the owner of the “Money”.
For example, When the current user’s friend list contains Money’s owner, then I need to give him access to the owner’s user data.
and if the Money’s owner does not exist in the current user’s friend list, then the Money’s owner user info should not be visible.