diff options
author | David Storch <david.storch@mongodb.com> | 2022-09-14 17:17:39 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-09-14 18:45:53 +0000 |
commit | f599ca57cd8476c88428a53b2d844fde0afbce5e (patch) | |
tree | d94de247a301928f96e3ee6f64eb3939a20fbf66 /src/mongo/db/commands/oplog_application_checks.cpp | |
parent | cf379f81849b3f8f3d21f661b1eee25379c9a06a (diff) | |
download | mongo-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.cpp | 15 |
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(); } |