Sync function to allow writes from external/shadow bucket only
15 views
Skip to first unread message
Thiago Alencar
unread,
Feb 27, 2015, 5:20:14 PM2/27/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mobile-c...@googlegroups.com
Hi,
How can I setup a sync function to allow writes only from an external (shadow) bucket?
Thanks and BR,
Thiago
Jens Alfke
unread,
Feb 27, 2015, 9:07:37 PM2/27/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mobile-c...@googlegroups.com
On Feb 27, 2015, at 2:20 PM, Thiago Alencar <thia...@gmail.com> 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
Thiago Alencar
unread,
Feb 28, 2015, 6:02:50 AM2/28/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mobile-c...@googlegroups.com
Nice trick! just tested it, exactly what I needed, thanks Jens!