diff options
Diffstat (limited to 'src/mongo/db/commands')
-rw-r--r-- | src/mongo/db/commands/tenant_migration_donor_cmds.cpp | 8 | ||||
-rw-r--r-- | src/mongo/db/commands/tenant_migration_recipient_cmds.cpp | 21 |
2 files changed, 8 insertions, 21 deletions
diff --git a/src/mongo/db/commands/tenant_migration_donor_cmds.cpp b/src/mongo/db/commands/tenant_migration_donor_cmds.cpp index 3df446a8b77..19eb886ce20 100644 --- a/src/mongo/db/commands/tenant_migration_donor_cmds.cpp +++ b/src/mongo/db/commands/tenant_migration_donor_cmds.cpp @@ -126,8 +126,7 @@ public: return response; } - private: - void doCheckAuthorization(OperationContext* opCtx) const final { + void doCheckAuthorization(OperationContext* opCtx) const { uassert(ErrorCodes::Unauthorized, "Unauthorized", AuthorizationSession::get(opCtx->getClient()) @@ -135,6 +134,7 @@ public: ActionType::runTenantMigration)); } + private: bool supportsWriteConcern() const override { return false; } @@ -196,7 +196,7 @@ public: } private: - void doCheckAuthorization(OperationContext* opCtx) const final { + void doCheckAuthorization(OperationContext* opCtx) const { uassert(ErrorCodes::Unauthorized, "Unauthorized", AuthorizationSession::get(opCtx->getClient()) @@ -285,7 +285,7 @@ public: } private: - void doCheckAuthorization(OperationContext* opCtx) const final { + void doCheckAuthorization(OperationContext* opCtx) const { uassert(ErrorCodes::Unauthorized, "Unauthorized", AuthorizationSession::get(opCtx->getClient()) diff --git a/src/mongo/db/commands/tenant_migration_recipient_cmds.cpp b/src/mongo/db/commands/tenant_migration_recipient_cmds.cpp index 6a26c8c9fec..d8a917e5c3d 100644 --- a/src/mongo/db/commands/tenant_migration_recipient_cmds.cpp +++ b/src/mongo/db/commands/tenant_migration_recipient_cmds.cpp @@ -28,7 +28,6 @@ */ #define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand -#include "mongo/db/auth/authorization_session.h" #include "mongo/db/commands.h" #include "mongo/db/commands/feature_compatibility_version_parser.h" #include "mongo/db/commands/tenant_migration_donor_cmds_gen.h" @@ -129,15 +128,9 @@ public: } } - private: - void doCheckAuthorization(OperationContext* opCtx) const final { - uassert(ErrorCodes::Unauthorized, - "Unauthorized", - AuthorizationSession::get(opCtx->getClient()) - ->isAuthorizedForActionsOnResource(ResourcePattern::forClusterResource(), - ActionType::runTenantMigration)); - } + void doCheckAuthorization(OperationContext* opCtx) const {} + private: bool supportsWriteConcern() const override { return false; } @@ -211,15 +204,9 @@ public: recipientInstance->getCompletionFuture().get(opCtx); } - private: - void doCheckAuthorization(OperationContext* opCtx) const final { - uassert(ErrorCodes::Unauthorized, - "Unauthorized", - AuthorizationSession::get(opCtx->getClient()) - ->isAuthorizedForActionsOnResource(ResourcePattern::forClusterResource(), - ActionType::runTenantMigration)); - } + void doCheckAuthorization(OperationContext* opCtx) const {} + private: bool supportsWriteConcern() const override { return false; } |