couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [1/2] git commit: Ensure admin rights for admins in both config and users db
Date Mon, 26 Mar 2012 18:07:08 GMT
Updated Branches:
  refs/heads/1.2.x 654768d32 -> 9d441c544
  refs/heads/master 7d4181346 -> 40e8fe9d7


Ensure admin rights for admins in both config and users db


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

Branch: refs/heads/master
Commit: 40e8fe9d756d97e58f4de1b9a73abea8c03dd557
Parents: 7d41813
Author: Robert Newson <rnewson@apache.org>
Authored: Mon Mar 26 19:07:02 2012 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Mon Mar 26 19:07:02 2012 +0100

----------------------------------------------------------------------
 src/couchdb/couch_auth_cache.erl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/40e8fe9d/src/couchdb/couch_auth_cache.erl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_auth_cache.erl b/src/couchdb/couch_auth_cache.erl
index 6bdf1f4..8d665f9 100644
--- a/src/couchdb/couch_auth_cache.erl
+++ b/src/couchdb/couch_auth_cache.erl
@@ -51,7 +51,7 @@ get_user_creds(UserName) ->
         nil ->
             make_admin_doc(HashedPwd, Salt, [<<"_admin">>]);
         UserProps when is_list(UserProps) ->
-            make_admin_doc(HashedPwd, Salt, couch_util:get_value(<<"roles">>,
UserProps))
+            make_admin_doc(HashedPwd, Salt, [<<"_admin">>|couch_util:get_value(<<"roles">>,
UserProps)])
         end;
     "-pbkdf2-" ++ HashedPwdSaltAndIterations ->
         [HashedPwd, Salt, Iterations] = string:tokens(HashedPwdSaltAndIterations, ","),


Mime
View raw message