That's one way to do it. Another way is to create a separate doc for every user 
membership, looking something like
        {type: "membership", "doc": "some_document_id", "member": "jens"}
Then you set up the sync function to recognize this doc type and use it to 
grant "jens" access to channel "some_document_id".

The tradeoff is between one big document, or lots of small documents. (Or you 
can have an intermediate, like the above example but you make the "member" 
property an array so it can grant access to multiple users with one doc.)

If you expect users to be grouped together, you can bring roles into it — have 
the master doc list the roles it grants access to, and per-user docs stating 
what roles the user is in.

—Jens

-- 
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/27744146-C6EC-4005-A905-B9C6818AC795%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to