I’m building an iOS app with Realmk using Sync.
I’m currently trying to implement data permissions to restrict access of the users to the data.
As I saw in this post, collection level permissions are not yet available, so the only way to manage read/write access for users is to do it with sync permission. Am I right?
As far as I understand (from here), the management of the read/write permissions with sync is based on the comparison between the user id or a list of values which can be store in a collection and the partition key defined when enabling Sync.
If my understanding is correct, I have the following problem: I have several collections, each representing a group containing other collections. I’m currently using the partition key to know which collection is included in which other collection, for example:
Group1(id=“group1”, parentId=“root”), Group2(id=“group2”, parentId=“root”)
Group1.2(id=“group1.1”, parentId=“groupe1”), Groupe1.2(id=“group1.2”, parentId=“group1”),
with partition key =
So with this architecture, let’s say I have 100 groups in
collection2, if I want my user to have read access to 80 groups, does it mean that I need to store all the partitionId of all the groups in a specific collection (like the
permissions one in this example)?
I also have a second question: is there a way to let a user have read/write access only to objects in a collection that he created?
Thanks for your help!