Is it (or could it be) possible to have conditional authentication in the sync function?
I have a document that either the a user in a channel specific to the document or any admin (in my application domain) should be able to update.
What I really want to say is
requireAccess("access-channel") || requireAccess("admin-channel")
As I typed this, I realised I can do what I want by either adding all admins to the access-channel or better, adding an admin role to the access-channel and adding admins to the admin role, but I can think of other scenarios, e.g
requireAccess(oldDoc.user) || requireAccess("admin-channel")
or
requireAccess(oldDoc.user) || requireRole("admins")