Ah... Membership documents! Indeed. That's a great idea! Thank you.

As per roles. Is the following all the documentation available for roles?
http://developer.couchbase.com/mobile/develop/guides/sync-gateway/administering-sync-gateway/authorizing-users/index.html#roles

Are there more on how to create roles, add/remove users from it, etc?

slim

On Saturday, January 31, 2015 at 2:51:34 PM UTC-5, Jens Alfke wrote:
>
> 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/92fad6dd-63a0-479f-b244-fbc8aacaff03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to