Best practice for sharing data with other users using object-level access control?

cloud

#1

How would I go about sharing an individual object using access control with another user? For example, I have a to do item that I want one other user to have access to.

I’m using object-level access control for data in my default sync realm, but struggling to work out the best way to share objects with different users. I’ve read the Access Control docs but I’m still not clear on how I should go about inviting other users to access an object?

Previously I’d use createOfferForRealmAtURL and acceptOfferForToken to share a Realm, but as far as I can tell this doesn’t work for object level access control in the default realm (which everyone already has access to).


#2

The Access Control documentation covers it.

  1. Create Role
  2. Assign User to Role
  3. Create Permission (Role + read, write etc)
  4. Assign Permission to object’s permissions.