diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2015-04-07 15:15:59 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2015-04-16 16:00:28 -0400 |
commit | eb8025a6ff2c3652a1f89ae513f7a4a98cd4e2ab (patch) | |
tree | 07d6d6fd9ad11758f0122a9f4d721f4ec6901e0a /src/mongo/db/dbcommands.cpp | |
parent | a377aa8648de036659bbb4e67c8dfa030299718b (diff) | |
download | mongo-eb8025a6ff2c3652a1f89ae513f7a4a98cd4e2ab.tar.gz |
SERVER-17817 Make AuthorizationSession a decoration of ClientBasic.
Diffstat (limited to 'src/mongo/db/dbcommands.cpp')
-rw-r--r-- | src/mongo/db/dbcommands.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/dbcommands.cpp b/src/mongo/db/dbcommands.cpp index 7857b22e502..510be597a87 100644 --- a/src/mongo/db/dbcommands.cpp +++ b/src/mongo/db/dbcommands.cpp @@ -306,7 +306,7 @@ namespace mongo { virtual Status checkAuthForCommand(ClientBasic* client, const std::string& dbname, const BSONObj& cmdObj) { - AuthorizationSession* authzSession = client->getAuthorizationSession(); + AuthorizationSession* authzSession = AuthorizationSession::get(client); if (cmdObj.firstElement().numberInt() == -1 && !cmdObj.hasField("slowms")) { // If you just want to get the current profiling level you can do so with just @@ -488,7 +488,7 @@ namespace mongo { virtual Status checkAuthForCommand(ClientBasic* client, const std::string& dbname, const BSONObj& cmdObj) { - AuthorizationSession* authzSession = client->getAuthorizationSession(); + AuthorizationSession* authzSession = AuthorizationSession::get(client); if (cmdObj["capped"].trueValue()) { if (!authzSession->isAuthorizedForActionsOnResource( parseResourcePattern(dbname, cmdObj), ActionType::convertToCapped)) { @@ -1250,7 +1250,7 @@ namespace mongo { // in that code path that must not see the impersonated user and roles array elements. std::vector<UserName> parsedUserNames; std::vector<RoleName> parsedRoleNames; - AuthorizationSession* authSession = txn->getClient()->getAuthorizationSession(); + AuthorizationSession* authSession = AuthorizationSession::get(txn->getClient()); bool rolesFieldIsPresent = false; bool usersFieldIsPresent = false; audit::parseAndRemoveImpersonatedRolesField(cmdObj, |