couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikewall...@apache.org
Subject ddoc-cache commit: updated refs/heads/master to 04c946f
Date Wed, 15 Jul 2015 10:18:49 GMT
Repository: couchdb-ddoc-cache
Updated Branches:
  refs/heads/master d65a85cf1 -> 04c946f4f


Allow ddoc_cache to open restricted design docs

Design docs in the authentication DB cannot be opened without an
admin context so this commit teaches ddoc_cache to always use
?ADMIN_CTX when opening documents.

COUCHDB-2738

This closes #1


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ddoc-cache/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ddoc-cache/commit/04c946f4
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ddoc-cache/tree/04c946f4
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ddoc-cache/diff/04c946f4

Branch: refs/heads/master
Commit: 04c946f4f63bc05a2b566ccc59e78938d517eb24
Parents: d65a85c
Author: Mike Wallace <mikewallace@apache.org>
Authored: Tue Jun 30 21:51:23 2015 +0100
Committer: Mike Wallace <mikewallace@apache.org>
Committed: Wed Jul 15 11:13:14 2015 +0100

----------------------------------------------------------------------
 src/ddoc_cache_opener.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ddoc-cache/blob/04c946f4/src/ddoc_cache_opener.erl
----------------------------------------------------------------------
diff --git a/src/ddoc_cache_opener.erl b/src/ddoc_cache_opener.erl
index 0236921..b76a228 100644
--- a/src/ddoc_cache_opener.erl
+++ b/src/ddoc_cache_opener.erl
@@ -117,10 +117,10 @@ match_newest(Key) ->
     end.
 
 recover_doc(DbName, DDocId) ->
-    fabric:open_doc(DbName, DDocId, [ejson_body]).
+    fabric:open_doc(DbName, DDocId, [ejson_body, ?ADMIN_CTX]).
 
 recover_doc(DbName, DDocId, Rev) ->
-    {ok, [Resp]} = fabric:open_revs(DbName, DDocId, [Rev], [ejson_body]),
+    {ok, [Resp]} = fabric:open_revs(DbName, DDocId, [Rev], [ejson_body, ?ADMIN_CTX]),
     Resp.
 
 recover_validation_funs(DbName) ->


Mime
View raw message