Hi Jens,

Thanks much for your quick reply. I will try the two array approach for 
RO/RW however I am not quite sure if I understand your comment regarding 
the need for individual permissions. Without going into detail of our 
solution lets use the task manager sample again.

If I have list objects and tasks objects (with a list reference for 
ownership) how I would implemented implement security and permissions? I 
want to share the list with other users (hence adding them to the list 
member list) but how do I need manage my tasks that I want people to access 
as well? Wouldn't I have to add the newly added user (I share with) to the 
member array of each of my tasks?

As a matter of fact I was wondering about that in the sample in general - 
Tasks don't have members assigned. Does that mean that they are accessible 
by anyone except that I use the list object as a "filter"?

Thanks

On Monday, October 13, 2014 5:12:00 PM UTC-7, Jens Alfke wrote:
>
>
> On Oct 13, 2014, at 3:59 PM, Christoph Berlin <[email protected] 
> <javascript:>> wrote:
>
> But then its get relatively cumbersome to share as I need to add a user to 
> members AND members_readwrite and they can get easily out of sync.
>
>
> Adding an entry to two arrays in a single document shouldn't be too 
> cumbersome. If you're worried about inconsistency, write the client code so 
> there's only one function/method that updates these properties.
>
>
>    1. Do child objects (documents) of parent documents inherit 
>    permissions automatically or do I have to assign channels individual and 
> if 
>    so how?
>
> There's no inherent relationship between any two documents. You can have 
> one document refer to another by incorporating its ID as a property, but 
> that's just a convention. Strong relationships (like foreign keys in 
> relational DBs) aren't practical in distributed systems because there's no 
> practical way to enforce multi-document transactions.
>
> I don't think this should be a problem for your model, though. Or do you 
> really need every one of a user's documents to have its own independent set 
> of access privileges?
>
> —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/2b89c08e-63be-4537-a839-a8afcb339236%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to