couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [1/9] couch-mrview commit: updated refs/heads/master to 065dc26
Date Fri, 30 Jan 2015 18:10:54 GMT
Repository: couchdb-couch-mrview
Updated Branches:
  refs/heads/master 09272b7b0 -> 065dc26e3


Add namespace option to all_docs_req

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/119fced0
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/119fced0
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/119fced0

Branch: refs/heads/master
Commit: 119fced0ebc2f1e7230d00d76e8c643baecc67e6
Parents: 439f322
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Mon Dec 15 15:28:04 2014 -0800
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Wed Dec 31 10:46:50 2014 -0800

----------------------------------------------------------------------
 src/couch_mrview_http.erl | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/119fced0/src/couch_mrview_http.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_http.erl b/src/couch_mrview_http.erl
index a04bcc4..28d1cc5 100644
--- a/src/couch_mrview_http.erl
+++ b/src/couch_mrview_http.erl
@@ -159,11 +159,14 @@ handle_cleanup_req(Req, _Db) ->
 
 
 all_docs_req(Req, Db, Keys) ->
+    all_docs_req(Req, Db, Keys, undefined).
+
+all_docs_req(Req, Db, Keys, NS) ->
     case couch_db:is_system_db(Db) of
     true ->
         case (catch couch_db:check_is_admin(Db)) of
         ok ->
-            do_all_docs_req(Req, Db, Keys);
+            do_all_docs_req(Req, Db, Keys, NS);
         _ ->
             DbName = ?b2l(Db#db.name),
             case config:get("couch_httpd_auth",
@@ -174,7 +177,7 @@ all_docs_req(Req, Db, Keys) ->
                 PublicFields = config:get("couch_httpd_auth", "public_fields"),
                 case {UsersDbPublic, PublicFields} of
                 {"true", PublicFields} when PublicFields =/= undefined ->
-                    do_all_docs_req(Req, Db, Keys);
+                    do_all_docs_req(Req, Db, Keys, NS);
                 {_, _} ->
                     throw({forbidden, <<"Only admins can access _all_docs",
                                         " of system databases.">>})
@@ -185,10 +188,10 @@ all_docs_req(Req, Db, Keys) ->
             end
         end;
     false ->
-        do_all_docs_req(Req, Db, Keys)
+        do_all_docs_req(Req, Db, Keys, NS)
     end.
 
-do_all_docs_req(Req, Db, Keys) ->
+do_all_docs_req(Req, Db, Keys, _NS) ->
     Args0 = parse_params(Req, Keys),
     ETagFun = fun(Sig, Acc0) ->
         check_view_etag(Sig, Acc0, Req)


Mime
View raw message