Hey everyone! I got stuck on making a document available for two users only. My partition is
friendshipUsers=userId1+userId2. In a backend function I check if user’s Id is contained in the partition and then I give read/write permissions. However the problem is with opening a realm in the client.
A hacky solution would be to check if the client had issues connecting to realm with partition
user1+user2 and if so then try with
Another thing I can do I suppose is duplicate the document so each user access their own doc and update each one with function when there is a change.
Is there a way to have two user read and write to the same document by checking their ids?