On Mon, Sep 14, 2015 at 04:09:00PM +0000, Jens Alfke wrote:
>
> On Sep 14, 2015, at 1:48 AM, James 
> <[email protected]<mailto:[email protected]>> wrote:
>
> Is there away to do requireAccess(...) || requireRole(...) ?
>
> No, there isn’t. It just never occurred to us. Can you explain what you’d use 
> it for?
> You can file an request for it on the Sync Gateway Github repo’s issue 
> tracker.

Would it be possible to do this using try/catch?

try {
  requireAccess('myChannel');
} catch(e) {
  requireRole('myRole');
}

A user who passes either require check would carry on, while everyone
else would throw on the requireRole check. Right?

Matt

-- 
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/20150915183113.GA1229%40Matts-MacBook-Pro.local.
For more options, visit https://groups.google.com/d/optout.

Reply via email to