couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject chttpd commit: updated refs/heads/2991-restore-1x-users-behaviour to df264ad
Date Mon, 16 May 2016 11:01:16 GMT
Repository: couchdb-chttpd
Updated Branches:
  refs/heads/2991-restore-1x-users-behaviour [created] df264ad1f


restore 1.x _users and _replicator behaviour


Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/df264ad1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/df264ad1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/df264ad1

Branch: refs/heads/2991-restore-1x-users-behaviour
Commit: df264ad1fba5caa05d62165b6dc7b2fdb22c676d
Parents: 34f0a81
Author: Jan Lehnardt <jan@apache.org>
Authored: Mon May 16 13:01:04 2016 +0200
Committer: Jan Lehnardt <jan@apache.org>
Committed: Mon May 16 13:01:04 2016 +0200

----------------------------------------------------------------------
 src/chttpd_auth_request.erl | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/df264ad1/src/chttpd_auth_request.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_auth_request.erl b/src/chttpd_auth_request.erl
index b05c91f..90176c8 100644
--- a/src/chttpd_auth_request.erl
+++ b/src/chttpd_auth_request.erl
@@ -39,12 +39,20 @@ authorize_request_int(#httpd{path_parts=[<<"_replicator">>],
method='PUT'}=Req)
     require_admin(Req);
 authorize_request_int(#httpd{path_parts=[<<"_replicator">>], method='DELETE'}=Req)
->
     require_admin(Req);
+authorize_request_int(#httpd{path_parts=[<<"_replicator">>,<<"_all_docs">>|_]}=Req)
->
+    require_admin(Req);
+authorize_request_int(#httpd{path_parts=[<<"_replicator">>,<<"_changes">>|_]}=Req)
->
+    require_admin(Req);
 authorize_request_int(#httpd{path_parts=[<<"_replicator">>|_]}=Req) ->
     db_authorization_check(Req);
 authorize_request_int(#httpd{path_parts=[<<"_users">>], method='PUT'}=Req) ->
     require_admin(Req);
 authorize_request_int(#httpd{path_parts=[<<"_users">>], method='DELETE'}=Req)
->
     require_admin(Req);
+authorize_request_int(#httpd{path_parts=[<<"_users">>,<<"_all_docs">>|_]}=Req)
->
+    require_admin(Req);
+authorize_request_int(#httpd{path_parts=[<<"_users">>,<<"_changes">>|_]}=Req)
->
+    require_admin(Req);
 authorize_request_int(#httpd{path_parts=[<<"_users">>|_]}=Req) ->
     db_authorization_check(Req);
 authorize_request_int(#httpd{path_parts=[<<"_", _/binary>>|_]}=Req) ->


Mime
View raw message