Nice trick! just tested it, exactly what I needed, thanks Jens!

On Saturday, February 28, 2015 at 3:07:37 AM UTC+1, Jens Alfke wrote:
>
>
> On Feb 27, 2015, at 2:20 PM, Thiago Alencar <[email protected] 
> <javascript:>> wrote:
>
> How can I setup a sync function to allow writes only from an external 
> (shadow) bucket? 
>
>
> Hm. Probably by taking advantage of the fact that the writes from the 
> other bucket are made with admin/superuser privileges instead of as a user 
> account. 
>
> For example you could call requireUser(“some_nonexistent_user”) which will 
> fail for any user-initiated change but will pass for an admin-initiated 
> change (either a PUT on the admin port or coming from the external bucket.)
>
> —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/16c7dad6-8651-4629-9e9f-10571c310412%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to