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")



-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/054d1af9-b2bf-4852-b77d-72f3777850d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to