summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/oplog_application_checks.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@mongodb.com>2022-09-14 17:17:39 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-09-14 18:45:53 +0000
commitf599ca57cd8476c88428a53b2d844fde0afbce5e (patch)
treed94de247a301928f96e3ee6f64eb3939a20fbf66 /src/mongo/db/commands/oplog_application_checks.cpp
parentcf379f81849b3f8f3d21f661b1eee25379c9a06a (diff)
downloadmongo-f599ca57cd8476c88428a53b2d844fde0afbce5e.tar.gz
SERVER-67116 Remove support for 'preCondition' from applyOps command
Diffstat (limited to 'src/mongo/db/commands/oplog_application_checks.cpp')
-rw-r--r--src/mongo/db/commands/oplog_application_checks.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/mongo/db/commands/oplog_application_checks.cpp b/src/mongo/db/commands/oplog_application_checks.cpp
index 80e0e8720e3..02cc6e51366 100644
--- a/src/mongo/db/commands/oplog_application_checks.cpp
+++ b/src/mongo/db/commands/oplog_application_checks.cpp
@@ -258,21 +258,6 @@ Status OplogApplicationChecks::checkAuthForCommand(OperationContext* opCtx,
}
}
- BSONElement preconditions = cmdObj["preCondition"];
- if (!preconditions.eoo()) {
- for (const BSONElement& precondition : preconditions.Array()) {
- checkBSONType(BSONType::Object, precondition);
- BSONElement nsElem = precondition.Obj()["ns"];
- checkBSONType(BSONType::String, nsElem);
- NamespaceString nss(nsElem.checkAndGetStringData());
-
- if (!authSession->isAuthorizedForActionsOnResource(
- ResourcePattern::forExactNamespace(nss), ActionType::find)) {
- return Status(ErrorCodes::Unauthorized, "Unauthorized to check precondition");
- }
- }
- }
-
return Status::OK();
}