summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/pipeline_command.cpp
diff options
context:
space:
mode:
authorRuoxin Xu <ruoxin.xu@mongodb.com>2021-01-19 15:34:37 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-01-30 21:50:14 +0000
commit193823453567d03d2c41e35e9dd526311c0f6f3f (patch)
tree3dc4d99ea3534ddba3fa70f942c208fc2c7d483c /src/mongo/db/commands/pipeline_command.cpp
parent75832e5ba1915f93f858998f6d4205d424fff455 (diff)
downloadmongo-193823453567d03d2c41e35e9dd526311c0f6f3f.tar.gz
SERVER-51624 Modify query commands to enforce API version 1 behaviour
Diffstat (limited to 'src/mongo/db/commands/pipeline_command.cpp')
-rw-r--r--src/mongo/db/commands/pipeline_command.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/commands/pipeline_command.cpp b/src/mongo/db/commands/pipeline_command.cpp
index 6535d11c2b1..341c42d1aca 100644
--- a/src/mongo/db/commands/pipeline_command.cpp
+++ b/src/mongo/db/commands/pipeline_command.cpp
@@ -73,7 +73,10 @@ public:
const OpMsgRequest& opMsgRequest,
boost::optional<ExplainOptions::Verbosity> explainVerbosity) override {
const auto aggregationRequest = uassertStatusOK(aggregation_request_helper::parseFromBSON(
- opMsgRequest.getDatabase().toString(), opMsgRequest.body, explainVerbosity));
+ opMsgRequest.getDatabase().toString(),
+ opMsgRequest.body,
+ explainVerbosity,
+ APIParameters::get(opCtx).getAPIStrict().value_or(false)));
auto privileges =
uassertStatusOK(AuthorizationSession::get(opCtx->getClient())