couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikewall...@apache.org
Subject chttpd commit: updated refs/heads/2452-users-db-security-on-clustered-interface to e5301ca
Date Fri, 16 Jan 2015 17:17:46 GMT
Repository: couchdb-chttpd
Updated Branches:
  refs/heads/2452-users-db-security-on-clustered-interface f2fcc285a -> e5301cab5


[squash] simplify IsUsersDb check

I realised the second part of the orelse is not needed here.
Because this code is in chttpd we will only be dealing with the
cluster-level DB name, not internal shard names, so there is
never a need to call mem3:dbname. We still need to convert from
binary to list though.

The replication DB check is also removed as that information is
not used here.

To squash into 9b5406b4b6d39ec5df6d1061c270f7a90e797a67


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

Branch: refs/heads/2452-users-db-security-on-clustered-interface
Commit: e5301cab58f2044f33a905fa95de52e8c4c0f48b
Parents: f2fcc28
Author: Mike Wallace <mikewallace@apache.org>
Authored: Fri Jan 16 14:38:00 2015 +0000
Committer: Mike Wallace <mikewallace@apache.org>
Committed: Fri Jan 16 17:05:43 2015 +0000

----------------------------------------------------------------------
 src/chttpd_db.erl | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/e5301cab/src/chttpd_db.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_db.erl b/src/chttpd_db.erl
index b78592a..97886ea 100644
--- a/src/chttpd_db.erl
+++ b/src/chttpd_db.erl
@@ -265,11 +265,9 @@ delete_db_req(#httpd{}=Req, DbName) ->
     end.
 
 get_db_options(DbName) ->
-    IsReplicatorDb = DbName == config:get("replicator", "db", "_replicator"),
-    IsUsersDb = DbName ==config:get("chttpd_auth", "authentication_db", "_users") orelse
-    binary_to_list(mem3:dbname(DbName)) == config:get("chttpd_auth", "authentication_db",
"_users"),
-    case {IsReplicatorDb, IsUsersDb} of
-    {false, false} ->
+    IsUsersDb = binary_to_list(DbName) == config:get("chttpd_auth", "authentication_db",
"_users"),
+    case IsUsersDb of
+    false ->
         [];
     _Else ->
         [sys_db]


Mime
View raw message