diff options
author | Rishab Joshi <rishab.joshi@mongodb.com> | 2021-02-19 06:20:44 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-02-19 09:32:47 +0000 |
commit | b785ca3a3d785814ac7201d5a7d52e718df7e689 (patch) | |
tree | ca0f6c2aa5a3ccd142ca8894fda6939f240c398d /src/mongo/db/pipeline/document_source_replace_root.cpp | |
parent | a40e23d8613ad123e26112a61e26963909f1fa07 (diff) | |
download | mongo-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.cpp | 6 |
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) { |