summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/config/configsvr_split_chunk_command.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/config/configsvr_split_chunk_command.cpp')
-rw-r--r--src/mongo/db/s/config/configsvr_split_chunk_command.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mongo/db/s/config/configsvr_split_chunk_command.cpp b/src/mongo/db/s/config/configsvr_split_chunk_command.cpp
index 37ac4d023b6..4aa73b27c5c 100644
--- a/src/mongo/db/s/config/configsvr_split_chunk_command.cpp
+++ b/src/mongo/db/s/config/configsvr_split_chunk_command.cpp
@@ -94,11 +94,12 @@ public:
return true;
}
- Status checkAuthForCommand(Client* client,
- const std::string& dbname,
- const BSONObj& cmdObj) const override {
- if (!AuthorizationSession::get(client)->isAuthorizedForActionsOnResource(
- ResourcePattern::forClusterResource(), ActionType::internal)) {
+ Status checkAuthForOperation(OperationContext* opCtx,
+ const DatabaseName&,
+ const BSONObj&) const override {
+ if (!AuthorizationSession::get(opCtx->getClient())
+ ->isAuthorizedForActionsOnResource(ResourcePattern::forClusterResource(),
+ ActionType::internal)) {
return Status(ErrorCodes::Unauthorized, "Unauthorized");
}
return Status::OK();