diff options
Diffstat (limited to 'src/mongo/db/commands/pipeline_command.cpp')
-rw-r--r-- | src/mongo/db/commands/pipeline_command.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/db/commands/pipeline_command.cpp b/src/mongo/db/commands/pipeline_command.cpp index 20eab15b603..48f6d7f7e4c 100644 --- a/src/mongo/db/commands/pipeline_command.cpp +++ b/src/mongo/db/commands/pipeline_command.cpp @@ -81,13 +81,18 @@ public: OperationContext* opCtx, const OpMsgRequest& opMsgRequest, boost::optional<ExplainOptions::Verbosity> explainVerbosity) override { + + SerializationContext serializationCtx = SerializationContext::stateCommandRequest(); + serializationCtx.setTenantIdSource(opMsgRequest.getValidatedTenantId() != boost::none); + const auto aggregationRequest = aggregation_request_helper::parseFromBSON( opCtx, DatabaseNameUtil::deserialize(opMsgRequest.getValidatedTenantId(), opMsgRequest.getDatabase()), opMsgRequest.body, explainVerbosity, - APIParameters::get(opCtx).getAPIStrict().value_or(false)); + APIParameters::get(opCtx).getAPIStrict().value_or(false), + serializationCtx); auto privileges = uassertStatusOK( auth::getPrivilegesForAggregate(AuthorizationSession::get(opCtx->getClient()), |