summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Shuvalov <andrew.shuvalov@mongodb.com>2021-03-01 22:18:58 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-03-01 22:44:46 +0000
commit33a8c0755e5d0e6202bdc5bb746fcb9ff9645766 (patch)
treed1bd03ecb7e53a78c359f67ff25b4b394b86b24f /src
parent4fbc6225a2baaaea78c73ded66048a198677e335 (diff)
downloadmongo-33a8c0755e5d0e6202bdc5bb746fcb9ff9645766.tar.gz
Revert "SERVER-54650: Make recipientSyncData and recipientForgetMigration require runTenantMigration action type"
This reverts commit f30e562830d4790afbf86d03a583b9cacc30a382.
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/commands/tenant_migration_donor_cmds.cpp8
-rw-r--r--src/mongo/db/commands/tenant_migration_recipient_cmds.cpp21
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;
}