This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch bulk_get_users_db
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit ce32d16d27b7827b4f479434a4c7c9efdc7f4384
Author: Robert Newson <rnew...@apache.org>
AuthorDate: Thu Oct 11 17:13:46 2018 +0100

    Pass user_ctx in _bulk_get
    
    This fixes _bulk_get for _users db and probably others I don't know
---
 src/chttpd/src/chttpd_db.erl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/chttpd/src/chttpd_db.erl b/src/chttpd/src/chttpd_db.erl
index 9cde6d9..d0a5a5b 100644
--- a/src/chttpd/src/chttpd_db.erl
+++ b/src/chttpd/src/chttpd_db.erl
@@ -482,8 +482,9 @@ db_req(#httpd{method='POST', path_parts=[_, 
<<"_bulk_get">>]}=Req, Db) ->
             throw({bad_request, <<"Missing JSON list of 'docs'.">>});
         Docs ->
             #doc_query_args{
-                options = Options
+                options = Options0
             } = bulk_get_parse_doc_query(Req),
+            Options = [{user_ctx, Req#httpd.user_ctx} | Options0],
 
             {ok, Resp} = start_json_response(Req, 200),
             send_chunk(Resp, <<"{\"results\": [">>),

Reply via email to