summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth
diff options
context:
space:
mode:
authorNick Zolnierz <nicholas.zolnierz@mongodb.com>2018-03-02 10:49:23 -0500
committerNick Zolnierz <nicholas.zolnierz@mongodb.com>2018-03-02 10:49:23 -0500
commitfb3390f096192598f1bde7d3445e2580ccf0557e (patch)
treeacb7ca00cad546a62fee185954a441585a81e5f1 /src/mongo/db/auth
parenta8fddd07a740e959646995ef93139887b3b3eb5c (diff)
downloadmongo-fb3390f096192598f1bde7d3445e2580ccf0557e.tar.gz
SERVER-29519 Remove getGlobalReplicationCoordinator. Replace when getting decoration through service context (global if needed).
This reverts commit a8fddd07a740e959646995ef93139887b3b3eb5c.
Diffstat (limited to 'src/mongo/db/auth')
-rw-r--r--src/mongo/db/auth/SConscript2
-rw-r--r--src/mongo/db/auth/authz_session_external_state_d.cpp9
2 files changed, 6 insertions, 5 deletions
diff --git a/src/mongo/db/auth/SConscript b/src/mongo/db/auth/SConscript
index db4f9cfce13..5827aa592d1 100644
--- a/src/mongo/db/auth/SConscript
+++ b/src/mongo/db/auth/SConscript
@@ -197,7 +197,7 @@ env.Library('authmongod',
'$BUILD_DIR/mongo/db/db_raii',
'$BUILD_DIR/mongo/db/dbdirectclient',
'$BUILD_DIR/mongo/db/dbhelpers',
- '$BUILD_DIR/mongo/db/repl/repl_coordinator_global',
+ '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface',
'$BUILD_DIR/mongo/db/server_parameters',
],
)
diff --git a/src/mongo/db/auth/authz_session_external_state_d.cpp b/src/mongo/db/auth/authz_session_external_state_d.cpp
index 77f0f0df856..0c8689feb10 100644
--- a/src/mongo/db/auth/authz_session_external_state_d.cpp
+++ b/src/mongo/db/auth/authz_session_external_state_d.cpp
@@ -34,7 +34,7 @@
#include "mongo/db/client.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/operation_context.h"
-#include "mongo/db/repl/replication_coordinator_global.h"
+#include "mongo/db/repl/replication_coordinator.h"
#include "mongo/scripting/engine.h"
#include "mongo/util/assert_util.h"
@@ -60,9 +60,10 @@ bool AuthzSessionExternalStateMongod::shouldIgnoreAuthChecks() const {
bool AuthzSessionExternalStateMongod::serverIsArbiter() const {
// Arbiters have access to extra privileges under localhost. See SERVER-5479.
- return (repl::getGlobalReplicationCoordinator()->getReplicationMode() ==
- repl::ReplicationCoordinator::modeReplSet &&
- repl::getGlobalReplicationCoordinator()->getMemberState().arbiter());
+ return (
+ repl::ReplicationCoordinator::get(getGlobalServiceContext())->getReplicationMode() ==
+ repl::ReplicationCoordinator::modeReplSet &&
+ repl::ReplicationCoordinator::get(getGlobalServiceContext())->getMemberState().arbiter());
}
} // namespace mongo