summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/expression.cpp
diff options
context:
space:
mode:
authorVarun Ravichandran <varun.ravichandran@mongodb.com>2023-05-05 21:56:32 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-10 23:53:29 +0000
commiteb241a9571423c17e68677a443323fd0e8fa47d4 (patch)
tree3851aeb7c46cde0d0ef24f6493113b459df73cc2 /src/mongo/db/pipeline/expression.cpp
parent053ff9f355555cddddf3a476ffa9ddf899b1657d (diff)
downloadmongo-eb241a9571423c17e68677a443323fd0e8fa47d4.tar.gz
SERVER-70689: Remove featureFlagUserRoles
Diffstat (limited to 'src/mongo/db/pipeline/expression.cpp')
-rw-r--r--src/mongo/db/pipeline/expression.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/mongo/db/pipeline/expression.cpp b/src/mongo/db/pipeline/expression.cpp
index 0ef3a2db975..932c8404210 100644
--- a/src/mongo/db/pipeline/expression.cpp
+++ b/src/mongo/db/pipeline/expression.cpp
@@ -2446,23 +2446,6 @@ intrusive_ptr<ExpressionFieldPath> ExpressionFieldPath::parse(ExpressionContext*
variableValidation::validateNameForUserRead(varName);
auto varId = vps.getVariable(varName);
- bool queryFeatureAllowedUserRoles = varId == Variables::kUserRolesId
- ? (!expCtx->maxFeatureCompatibilityVersion ||
- feature_flags::gFeatureFlagUserRoles.isEnabledOnVersion(
- *expCtx->maxFeatureCompatibilityVersion))
- : true;
-
- uassert(
- ErrorCodes::QueryFeatureNotAllowed,
- // We would like to include the current version and the required minimum version in this
- // error message, but using FeatureCompatibilityVersion::toString() would introduce a
- // dependency cycle (see SERVER-31968).
- str::stream()
- << "$$USER_ROLES is not allowed in the current feature compatibility version. See "
- << feature_compatibility_version_documentation::kCompatibilityLink
- << " for more information.",
- queryFeatureAllowedUserRoles);
-
// If the variable we are parsing is a system variable, then indicate that we have seen it.
if (!Variables::isUserDefinedVariable(varId)) {
expCtx->setSystemVarReferencedInQuery(varId);