What I'm leaning toward is just creating a EVERYONE role, then adding any 
new user to that role.

Then giving any public space provide access to that role.

I guess that's the way?

slim

On Wednesday, October 21, 2015 at 5:36:39 PM UTC-4, Seung Chan Lim wrote:
>
> I have the following two types of documents 
>
> 1. space
> 2. conversation: "space" attribute points to the _id of space
>
> Whenever a conversation starts, a new doc of type "conversation" is 
> created and its attribute "space" contains the _id of a doc of type "space"
>
> What I want to ensure in my sync function is that the user creating a 
> "conversation" document has access to the "space" document pointed.
>
> I originally thought to simply do requireAccess(doc.space) when a 
> conversation doc is created/updated and make sure to do channel(doc._id) 
> and a access(doc.owner, doc._id) when a space doc is created/updated.
>
> But then I wanted to have public spaces, which anyone has access to. In 
> other words, even if the user isn't explicitly given a access to the 
> channel, I was hoping requireAccess would pass if the document is "public."
>
> I thought I could do this by doing access("GUEST", doc._id) when a space 
> doc is created/updated but that doesn't seem to work.
>
> Is this even possible?
>
> slim
>
>

-- 
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/1edbad8a-33e3-488e-9453-7c2707af3dac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to