summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth/sasl_mechanism_registry_test.cpp
diff options
context:
space:
mode:
authorSara Golemon <sara.golemon@mongodb.com>2018-06-13 17:31:38 -0400
committerSara Golemon <sara.golemon@mongodb.com>2018-06-14 14:47:42 -0400
commit91386a270d5ce8a296aa97036a7b9f54dedf4e28 (patch)
tree3e0824d707841c2ab0268fbeab91dd1e91ae69d6 /src/mongo/db/auth/sasl_mechanism_registry_test.cpp
parent6212273ec79659f28dff13d66a57ba2f2b1aab4a (diff)
downloadmongo-91386a270d5ce8a296aa97036a7b9f54dedf4e28.tar.gz
SERVER-35566 Proxy Cyrus/LDAP selection at runtime.
(cherry picked from commit 940ed1e95db94d132f018a82343fe0109b157272)
Diffstat (limited to 'src/mongo/db/auth/sasl_mechanism_registry_test.cpp')
-rw-r--r--src/mongo/db/auth/sasl_mechanism_registry_test.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mongo/db/auth/sasl_mechanism_registry_test.cpp b/src/mongo/db/auth/sasl_mechanism_registry_test.cpp
index bdce3b21199..6122498e20a 100644
--- a/src/mongo/db/auth/sasl_mechanism_registry_test.cpp
+++ b/src/mongo/db/auth/sasl_mechanism_registry_test.cpp
@@ -74,10 +74,8 @@ struct FooPolicy {
}
};
-template <bool argIsInternal>
class FooMechanism : public MakeServerMechanism<FooPolicy> {
public:
- static const bool isInternal = argIsInternal;
explicit FooMechanism(std::string authenticationDatabase)
: MakeServerMechanism<FooPolicy>(std::move(authenticationDatabase)) {}
@@ -89,8 +87,9 @@ protected:
};
template <bool argIsInternal>
-class FooMechanismFactory : public MakeServerFactory<FooMechanism<argIsInternal>> {
+class FooMechanismFactory : public MakeServerFactory<FooMechanism> {
public:
+ static constexpr bool isInternal = argIsInternal;
bool canMakeMechanismForUser(const User* user) const final {
return true;
}
@@ -107,10 +106,8 @@ struct BarPolicy {
}
};
-template <bool argIsInternal>
class BarMechanism : public MakeServerMechanism<BarPolicy> {
public:
- static const bool isInternal = argIsInternal;
explicit BarMechanism(std::string authenticationDatabase)
: MakeServerMechanism<BarPolicy>(std::move(authenticationDatabase)) {}
@@ -122,8 +119,9 @@ protected:
};
template <bool argIsInternal>
-class BarMechanismFactory : public MakeServerFactory<BarMechanism<argIsInternal>> {
+class BarMechanismFactory : public MakeServerFactory<BarMechanism> {
public:
+ static constexpr bool isInternal = argIsInternal;
bool canMakeMechanismForUser(const User* user) const final {
return true;
}