diff options
author | Spencer T Brody <spencer@10gen.com> | 2013-07-29 15:16:32 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@10gen.com> | 2013-07-30 17:50:33 -0400 |
commit | 213f27b7cb23486e62fecbb59659b9ec1a36a8c0 (patch) | |
tree | 0d033d537cd7715f317450241347cc04d3f27ef8 /src/mongo/db/auth/authz_manager_external_state.cpp | |
parent | c0b1115a5be9d554199ce014fe57c479b8ea105b (diff) | |
download | mongo-213f27b7cb23486e62fecbb59659b9ec1a36a8c0.tar.gz |
SERVER-9518 Change internalSecurity to store a User object
Diffstat (limited to 'src/mongo/db/auth/authz_manager_external_state.cpp')
-rw-r--r-- | src/mongo/db/auth/authz_manager_external_state.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/auth/authz_manager_external_state.cpp b/src/mongo/db/auth/authz_manager_external_state.cpp index 723c94d0b55..b4c2a5eef05 100644 --- a/src/mongo/db/auth/authz_manager_external_state.cpp +++ b/src/mongo/db/auth/authz_manager_external_state.cpp @@ -44,16 +44,16 @@ namespace mongo { return Status(ErrorCodes::BadValue, "Bad database name \"" + dbname + "\""); } - if (userName == internalSecurity.user) { - if (internalSecurity.pwd.empty()) { + if (userName == internalSecurity.user->getName()) { + if (internalSecurity.user->getCredentials().password.empty()) { return Status(ErrorCodes::UserNotFound, "key file must be used to log in with internal user", 15889); } *result = BSON(AuthorizationManager::USER_NAME_FIELD_NAME << - internalSecurity.user.getUser() << + internalSecurity.user->getName().getUser() << AuthorizationManager::PASSWORD_FIELD_NAME << - internalSecurity.pwd).getOwned(); + internalSecurity.user->getCredentials().password).getOwned(); return Status::OK(); } |