summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/current_op.cpp
diff options
context:
space:
mode:
authorSara Golemon <sara.golemon@mongodb.com>2022-09-26 12:16:57 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-10-04 16:51:46 +0000
commit5ff2f41b0dbad9ef4d96b1407b06a044c0b41c48 (patch)
tree707d5150c1616ab7c41412697c4b19b950731c44 /src/mongo/db/commands/current_op.cpp
parent810d5c1f2b0f8d3767df55812c3324d6171aa107 (diff)
downloadmongo-5ff2f41b0dbad9ef4d96b1407b06a044c0b41c48.tar.gz
SERVER-70146 Migrate checkAuthForCommand to checkAuthForOperation
Diffstat (limited to 'src/mongo/db/commands/current_op.cpp')
-rw-r--r--src/mongo/db/commands/current_op.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/commands/current_op.cpp b/src/mongo/db/commands/current_op.cpp
index 78fec805202..a6e546cf506 100644
--- a/src/mongo/db/commands/current_op.cpp
+++ b/src/mongo/db/commands/current_op.cpp
@@ -50,10 +50,10 @@ class CurrentOpCommand final : public CurrentOpCommandBase {
public:
CurrentOpCommand() = default;
- Status checkAuthForCommand(Client* client,
- const std::string& dbName,
- const BSONObj& cmdObj) const final {
- AuthorizationSession* authzSession = AuthorizationSession::get(client);
+ Status checkAuthForOperation(OperationContext* opCtx,
+ const DatabaseName&,
+ const BSONObj& cmdObj) const final {
+ AuthorizationSession* authzSession = AuthorizationSession::get(opCtx->getClient());
if (authzSession->isAuthorizedForActionsOnResource(ResourcePattern::forClusterResource(),
ActionType::inprog)) {
return Status::OK();