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:40:56 UTC

[couchdb] branch prototype/fdb-layer updated: 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
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/prototype/fdb-layer by this push:
     new 10a6011  Open dbs with admin privileges in couch_views_indexer
10a6011 is described below

commit 10a60115d86bc8a680eec320678ebe8c2db30325
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),