diff options
author | Sara Golemon <sara.golemon@mongodb.com> | 2022-09-26 12:16:57 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-10-04 16:51:46 +0000 |
commit | 5ff2f41b0dbad9ef4d96b1407b06a044c0b41c48 (patch) | |
tree | 707d5150c1616ab7c41412697c4b19b950731c44 /src/mongo/db/repl/repl_set_commands.cpp | |
parent | 810d5c1f2b0f8d3767df55812c3324d6171aa107 (diff) | |
download | mongo-5ff2f41b0dbad9ef4d96b1407b06a044c0b41c48.tar.gz |
SERVER-70146 Migrate checkAuthForCommand to checkAuthForOperation
Diffstat (limited to 'src/mongo/db/repl/repl_set_commands.cpp')
-rw-r--r-- | src/mongo/db/repl/repl_set_commands.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mongo/db/repl/repl_set_commands.cpp b/src/mongo/db/repl/repl_set_commands.cpp index cd17527bbf2..31112fa06c7 100644 --- a/src/mongo/db/repl/repl_set_commands.cpp +++ b/src/mongo/db/repl/repl_set_commands.cpp @@ -93,17 +93,19 @@ public: std::string help() const override { return "Just for tests.\n"; } + // No auth needed because it only works when enabled via command line. - virtual Status checkAuthForCommand(Client* client, - const std::string& dbname, - const BSONObj& cmdObj) const { + Status checkAuthForOperation(OperationContext*, + const DatabaseName&, + const BSONObj&) const override { return Status::OK(); } + CmdReplSetTest() : ReplSetCommand("replSetTest") {} - virtual bool run(OperationContext* opCtx, - const DatabaseName&, - const BSONObj& cmdObj, - BSONObjBuilder& result) { + bool run(OperationContext* opCtx, + const DatabaseName&, + const BSONObj& cmdObj, + BSONObjBuilder& result) override { LOGV2(21573, "replSetTest command received: {cmdObj}", "replSetTest command received", |