summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_replace_root.cpp
diff options
context:
space:
mode:
authorRishab Joshi <rishab.joshi@mongodb.com>2021-02-19 06:20:44 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-02-19 09:32:47 +0000
commitb785ca3a3d785814ac7201d5a7d52e718df7e689 (patch)
treeca0f6c2aa5a3ccd142ca8894fda6939f240c398d /src/mongo/db/pipeline/document_source_replace_root.cpp
parenta40e23d8613ad123e26112a61e26963909f1fa07 (diff)
downloadmongo-b785ca3a3d785814ac7201d5a7d52e718df7e689.tar.gz
SERVER-54072 Added internal-client checks for aggregation command.
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) {