You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2019/08/22 20:19:37 UTC

[couchdb] 01/01: Open dbs with admin privileges in couch_views_indexer

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

vatamane pushed a commit to branch prototype/fdb-layer-fix-couch-views-admin-open
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit ed9f6e9ea2587c3528f63aa8cc6813f59c1f498a
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Thu Aug 22 16:15:04 2019 -0400

    Open dbs with admin privileges in couch_views_indexer
    
    That is needed when indexing authentication dbs like `_users`.
---
 src/couch_views/src/couch_views_indexer.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/couch_views/src/couch_views_indexer.erl b/src/couch_views/src/couch_views_indexer.erl
index bebbd1a..60c8194 100644
--- a/src/couch_views/src/couch_views_indexer.erl
+++ b/src/couch_views/src/couch_views_indexer.erl
@@ -42,7 +42,7 @@ init() ->
         <<"sig">> := JobSig
     } = Data,
 
-    {ok, Db} = fabric2_db:open(DbName, []),
+    {ok, Db} = fabric2_db:open(DbName, [?ADMIN_CTX]),
     {ok, DDoc} = fabric2_db:open_doc(Db, DDocId),
     {ok, Mrst} = couch_views_util:ddoc_to_mrst(DbName, DDoc),
     HexSig = fabric2_util:to_hex(Mrst#mrst.sig),