diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2018-02-27 11:28:53 -0500 |
---|---|---|
committer | Henrik Edin <henrik.edin@mongodb.com> | 2018-03-02 09:58:48 -0500 |
commit | 7d37a75df3f6035a7afcb51123b88f0e99308fc8 (patch) | |
tree | 2f2a0b3f835ca14830208a3f894dd4e04a7e8cd0 /src/mongo/db/auth/authz_session_external_state_d.cpp | |
parent | 0b8094a34b9458ad46cf05cf67015d83725934b7 (diff) | |
download | mongo-7d37a75df3f6035a7afcb51123b88f0e99308fc8.tar.gz |
SERVER-29519 Remove getGlobalReplicationCoordinator. Replace when getting decoration through service context (global if needed).
Diffstat (limited to 'src/mongo/db/auth/authz_session_external_state_d.cpp')
-rw-r--r-- | src/mongo/db/auth/authz_session_external_state_d.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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 |