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/s/d_migrate.cpp | |
parent | a377aa8648de036659bbb4e67c8dfa030299718b (diff) | |
download | mongo-eb8025a6ff2c3652a1f89ae513f7a4a98cd4e2ab.tar.gz |
SERVER-17817 Make AuthorizationSession a decoration of ClientBasic.
Diffstat (limited to 'src/mongo/s/d_migrate.cpp')
-rw-r--r-- | src/mongo/s/d_migrate.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/s/d_migrate.cpp b/src/mongo/s/d_migrate.cpp index 8d6945f48a2..d074a1adfb0 100644 --- a/src/mongo/s/d_migrate.cpp +++ b/src/mongo/s/d_migrate.cpp @@ -998,7 +998,7 @@ namespace mongo { virtual Status checkAuthForCommand(ClientBasic* client, const std::string& dbname, const BSONObj& cmdObj) { - if (!client->getAuthorizationSession()->isAuthorizedForActionsOnResource( + if (!AuthorizationSession::get(client)->isAuthorizedForActionsOnResource( ResourcePattern::forExactNamespace(NamespaceString(parseNs(dbname, cmdObj))), ActionType::moveChunk)) { return Status(ErrorCodes::Unauthorized, "Unauthorized"); @@ -2653,7 +2653,7 @@ namespace mongo { OperationContextImpl txn; if (getGlobalAuthorizationManager()->isAuthEnabled()) { ShardedConnectionInfo::addHook(); - txn.getClient()->getAuthorizationSession()->grantInternalAuthorization(); + AuthorizationSession::get(txn.getClient())->grantInternalAuthorization(); } // Make curop active so this will show up in currOp. |