summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_replace_root.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/pipeline/document_source_replace_root.cpp')
-rw-r--r--src/mongo/db/pipeline/document_source_replace_root.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/document_source_replace_root.cpp b/src/mongo/db/pipeline/document_source_replace_root.cpp
index 2d3e1de27af..084d7398fb9 100644
--- a/src/mongo/db/pipeline/document_source_replace_root.cpp
+++ b/src/mongo/db/pipeline/document_source_replace_root.cpp
@@ -76,10 +76,12 @@ Document ReplaceRootTransformation::applyTransformation(const Document& input) {
REGISTER_DOCUMENT_SOURCE(replaceRoot,
LiteParsedDocumentSourceDefault::parse,
- DocumentSourceReplaceRoot::createFromBson);
+ DocumentSourceReplaceRoot::createFromBson,
+ LiteParsedDocumentSource::AllowedWithApiStrict::kAlways);
REGISTER_DOCUMENT_SOURCE(replaceWith,
LiteParsedDocumentSourceDefault::parse,
- DocumentSourceReplaceRoot::createFromBson);
+ DocumentSourceReplaceRoot::createFromBson,
+ LiteParsedDocumentSource::AllowedWithApiStrict::kAlways);
intrusive_ptr<DocumentSource> DocumentSourceReplaceRoot::createFromBson(
BSONElement elem, const intrusive_ptr<ExpressionContext>& expCtx) {