diff options
author | Jason Carey <jcarey@argv.me> | 2018-01-18 14:45:12 -0500 |
---|---|---|
committer | Jason Carey <jcarey@argv.me> | 2018-01-19 14:28:50 -0500 |
commit | d055ce30c42cec1171928f49c1739c0b14e0b455 (patch) | |
tree | efa390c089861f97ce83533f496f143def80cd2b /src/mongo/db/commands | |
parent | 5823009762c40b9632d735f0829ba7328baab0dd (diff) | |
download | mongo-d055ce30c42cec1171928f49c1739c0b14e0b455.tar.gz |
SERVER-32460 platforms upgrade/downgrade work
Diffstat (limited to 'src/mongo/db/commands')
7 files changed, 0 insertions, 91 deletions
diff --git a/src/mongo/db/commands/end_sessions_command.cpp b/src/mongo/db/commands/end_sessions_command.cpp index 8f6bb1ded29..74fa70a0f66 100644 --- a/src/mongo/db/commands/end_sessions_command.cpp +++ b/src/mongo/db/commands/end_sessions_command.cpp @@ -59,12 +59,6 @@ public: Status checkAuthForOperation(OperationContext* opCtx, const std::string& dbname, const BSONObj& cmdObj) override { - - if (serverGlobalParams.featureCompatibility.getVersion() != - ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo36) { - return SessionsCommandFCV34Status(getName()); - } - // It is always ok to run this command, as long as you are authenticated // as some user, if auth is enabled. AuthorizationSession* authSession = AuthorizationSession::get(opCtx->getClient()); @@ -81,13 +75,6 @@ public: const std::string& db, const BSONObj& cmdObj, BSONObjBuilder& result) override { - - if (serverGlobalParams.featureCompatibility.getVersion() != - ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo36) { - return CommandHelpers::appendCommandStatus(result, - SessionsCommandFCV34Status(getName())); - } - auto lsCache = LogicalSessionCache::get(opCtx); auto cmd = EndSessionsCmdFromClient::parse("EndSessionsCmdFromClient"_sd, cmdObj); diff --git a/src/mongo/db/commands/kill_all_sessions_by_pattern_command.cpp b/src/mongo/db/commands/kill_all_sessions_by_pattern_command.cpp index 45b01c712be..9388e593be5 100644 --- a/src/mongo/db/commands/kill_all_sessions_by_pattern_command.cpp +++ b/src/mongo/db/commands/kill_all_sessions_by_pattern_command.cpp @@ -72,12 +72,6 @@ public: Status checkAuthForOperation(OperationContext* opCtx, const std::string& dbname, const BSONObj& cmdObj) override { - - if (serverGlobalParams.featureCompatibility.getVersion() != - ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo36) { - return SessionsCommandFCV34Status(getName()); - } - AuthorizationSession* authSession = AuthorizationSession::get(opCtx->getClient()); if (!authSession->isAuthorizedForPrivilege( Privilege{ResourcePattern::forClusterResource(), ActionType::killAnySession})) { @@ -91,13 +85,6 @@ public: const std::string& db, const BSONObj& cmdObj, BSONObjBuilder& result) override { - - if (serverGlobalParams.featureCompatibility.getVersion() != - ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo36) { - return CommandHelpers::appendCommandStatus(result, - SessionsCommandFCV34Status(getName())); - } - IDLParserErrorContext ctx("KillAllSessionsByPatternCmd"); auto ksc = KillAllSessionsByPatternCmd::parse(ctx, cmdObj); diff --git a/src/mongo/db/commands/kill_all_sessions_command.cpp b/src/mongo/db/commands/kill_all_sessions_command.cpp index 907ffbe51d1..70137a4ad28 100644 --- a/src/mongo/db/commands/kill_all_sessions_command.cpp +++ b/src/mongo/db/commands/kill_all_sessions_command.cpp @@ -72,12 +72,6 @@ public: Status checkAuthForOperation(OperationContext* opCtx, const std::string& dbname, const BSONObj& cmdObj) override { - - if (serverGlobalParams.featureCompatibility.getVersion() != - ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo36) { - return SessionsCommandFCV34Status(getName()); - } - AuthorizationSession* authSession = AuthorizationSession::get(opCtx->getClient()); if (!authSession->isAuthorizedForPrivilege( Privilege{ResourcePattern::forClusterResource(), ActionType::killAnySession})) { @@ -91,13 +85,6 @@ public: const std::string& db, const BSONObj& cmdObj, BSONObjBuilder& result) override { - - if (serverGlobalParams.featureCompatibility.getVersion() != - ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo36) { - return CommandHelpers::appendCommandStatus(result, - SessionsCommandFCV34Status(getName())); - } - IDLParserErrorContext ctx("KillAllSessionsCmd"); auto ksc = KillAllSessionsCmd::parse(ctx, cmdObj); diff --git a/src/mongo/db/commands/kill_sessions_command.cpp b/src/mongo/db/commands/kill_sessions_command.cpp index 7b0e5b1375a..f371dc5b80d 100644 --- a/src/mongo/db/commands/kill_sessions_command.cpp +++ b/src/mongo/db/commands/kill_sessions_command.cpp @@ -101,12 +101,6 @@ public: Status checkAuthForOperation(OperationContext* opCtx, const std::string& dbname, const BSONObj& cmdObj) override { - - if (serverGlobalParams.featureCompatibility.getVersion() != - ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo36) { - return SessionsCommandFCV34Status(getName()); - } - return Status::OK(); } @@ -114,13 +108,6 @@ public: const std::string& db, const BSONObj& cmdObj, BSONObjBuilder& result) override { - - if (serverGlobalParams.featureCompatibility.getVersion() != - ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo36) { - return CommandHelpers::appendCommandStatus(result, - SessionsCommandFCV34Status(getName())); - } - IDLParserErrorContext ctx("KillSessionsCmd"); auto ksc = KillSessionsCmdFromClient::parse(ctx, cmdObj); diff --git a/src/mongo/db/commands/refresh_logical_session_cache_now.cpp b/src/mongo/db/commands/refresh_logical_session_cache_now.cpp index 7f21f14b952..b98d6a48815 100644 --- a/src/mongo/db/commands/refresh_logical_session_cache_now.cpp +++ b/src/mongo/db/commands/refresh_logical_session_cache_now.cpp @@ -65,12 +65,6 @@ public: Status checkAuthForOperation(OperationContext* opCtx, const std::string& dbname, const BSONObj& cmdObj) override { - - if (serverGlobalParams.featureCompatibility.getVersion() != - ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo36) { - return SessionsCommandFCV34Status(getName()); - } - return Status::OK(); } @@ -78,13 +72,6 @@ public: const std::string& db, const BSONObj& cmdObj, BSONObjBuilder& result) override { - - if (serverGlobalParams.featureCompatibility.getVersion() != - ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo36) { - return CommandHelpers::appendCommandStatus(result, - SessionsCommandFCV34Status(getName())); - } - auto cache = LogicalSessionCache::get(opCtx); auto client = opCtx->getClient(); diff --git a/src/mongo/db/commands/refresh_sessions_command.cpp b/src/mongo/db/commands/refresh_sessions_command.cpp index 3f1d3d932cd..894b3d9d1b6 100644 --- a/src/mongo/db/commands/refresh_sessions_command.cpp +++ b/src/mongo/db/commands/refresh_sessions_command.cpp @@ -61,12 +61,6 @@ public: Status checkAuthForOperation(OperationContext* opCtx, const std::string& dbname, const BSONObj& cmdObj) override { - - if (serverGlobalParams.featureCompatibility.getVersion() != - ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo36) { - return SessionsCommandFCV34Status(getName()); - } - // It is always ok to run this command, as long as you are authenticated // as some user, if auth is enabled. AuthorizationSession* authSession = AuthorizationSession::get(opCtx->getClient()); @@ -83,13 +77,6 @@ public: const std::string& db, const BSONObj& cmdObj, BSONObjBuilder& result) override { - - if (serverGlobalParams.featureCompatibility.getVersion() != - ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo36) { - return CommandHelpers::appendCommandStatus(result, - SessionsCommandFCV34Status(getName())); - } - IDLParserErrorContext ctx("RefreshSessionsCmdFromClient"); auto cmd = RefreshSessionsCmdFromClient::parse(ctx, cmdObj); auto res = diff --git a/src/mongo/db/commands/start_session_command.cpp b/src/mongo/db/commands/start_session_command.cpp index 9d03da70fbe..47e4e7726c3 100644 --- a/src/mongo/db/commands/start_session_command.cpp +++ b/src/mongo/db/commands/start_session_command.cpp @@ -66,12 +66,6 @@ public: Status checkAuthForOperation(OperationContext* opCtx, const std::string& dbname, const BSONObj& cmdObj) override { - - if (serverGlobalParams.featureCompatibility.getVersion() != - ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo36) { - return SessionsCommandFCV34Status(getName()); - } - return Status::OK(); } @@ -79,13 +73,6 @@ public: const std::string& db, const BSONObj& cmdObj, BSONObjBuilder& result) override { - - if (serverGlobalParams.featureCompatibility.getVersion() != - ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo36) { - return CommandHelpers::appendCommandStatus(result, - SessionsCommandFCV34Status(getName())); - } - auto client = opCtx->getClient(); ServiceContext* serviceContext = client->getServiceContext(); |