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/74a966d8-6e7d-4f62-80fb-ab9b2199fab1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.