summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/authentication_commands.cpp
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2018-03-14 15:54:13 -0400
committerBilly Donahue <billy.donahue@mongodb.com>2018-03-14 17:58:13 -0400
commit99de297d275339d7ff2f0a38530298cdf8f73fa4 (patch)
tree3ba1cad1be89e33add6ee03d38433ba69d44515c /src/mongo/db/commands/authentication_commands.cpp
parentb5ef3780e6956b51659e953080d783f67ca31b64 (diff)
downloadmongo-99de297d275339d7ff2f0a38530298cdf8f73fa4.tar.gz
SERVER-33892 Separate test_commands_enabled library
Diffstat (limited to 'src/mongo/db/commands/authentication_commands.cpp')
-rw-r--r--src/mongo/db/commands/authentication_commands.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/commands/authentication_commands.cpp b/src/mongo/db/commands/authentication_commands.cpp
index 121b1cf3aba..4d454be45fe 100644
--- a/src/mongo/db/commands/authentication_commands.cpp
+++ b/src/mongo/db/commands/authentication_commands.cpp
@@ -159,7 +159,7 @@ bool CmdAuthenticate::run(OperationContext* opCtx,
user = UserName(cmdObj.getStringField("user"), dbname);
}
- if (Command::testCommandsEnabled && user.getDB() == "admin" &&
+ if (getTestCommandsEnabled() && user.getDB() == "admin" &&
user.getUser() == internalSecurity.user->getName().getUser()) {
// Allows authenticating as the internal user against the admin database. This is to
// support the auth passthrough test framework on mongos (since you can't use the local
@@ -278,7 +278,7 @@ public:
BSONObjBuilder& result) {
AuthorizationSession* authSession = AuthorizationSession::get(Client::getCurrent());
authSession->logoutDatabase(dbname);
- if (Command::testCommandsEnabled && dbname == "admin") {
+ if (getTestCommandsEnabled() && dbname == "admin") {
// Allows logging out as the internal user against the admin database, however
// this actually logs out of the local database as well. This is to
// support the auth passthrough test framework on mongos (since you can't use the