couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [5/9] couch-mrview commit: updated refs/heads/master to 065dc26
Date Fri, 30 Jan 2015 18:10:58 GMT
Make _local_docs accessible by admin only

COUCHDB-1145


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/commit/0828a39c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/0828a39c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/0828a39c

Branch: refs/heads/master
Commit: 0828a39c3ae408baf01c0afd57bd1c510735c2e5
Parents: ca9ed2f
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Wed Dec 31 10:45:25 2014 -0800
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Wed Dec 31 10:47:18 2014 -0800

----------------------------------------------------------------------
 src/couch_mrview_http.erl | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/0828a39c/src/couch_mrview_http.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_http.erl b/src/couch_mrview_http.erl
index db7d2f4..75e2c54 100644
--- a/src/couch_mrview_http.erl
+++ b/src/couch_mrview_http.erl
@@ -185,6 +185,8 @@ all_docs_req(Req, Db, Keys, NS) ->
         case (catch couch_db:check_is_admin(Db)) of
         ok ->
             do_all_docs_req(Req, Db, Keys, NS);
+        _ when NS == <<"_local">> ->
+            throw({forbidden, <<"Only admins can access _local_docs">>});
         _ ->
             case is_public_fields_configured(Db) of
                 true ->


Mime
View raw message