From b5240d47596159ab71fef10390315cfeac739260 Mon Sep 17 00:00:00 2001 From: Bill McConaghy Date: Thu, 28 Feb 2019 13:56:01 -0500 Subject: [PATCH] disabling ccr and remote clusters when index mgmt is disabled (#32203) * disabling ccr and remote clusters when index mgmt is disabled * addressing PR feedback --- x-pack/plugins/cross_cluster_replication/index.js | 13 +++++++++++-- x-pack/plugins/remote_clusters/index.js | 7 ++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/cross_cluster_replication/index.js b/x-pack/plugins/cross_cluster_replication/index.js index c538ed78a85b6..4b2d513a43f22 100644 --- a/x-pack/plugins/cross_cluster_replication/index.js +++ b/x-pack/plugins/cross_cluster_replication/index.js @@ -22,7 +22,10 @@ export function crossClusterReplication(kibana) { injectDefaultVars(server) { const config = server.config(); return { - ccrUiEnabled: config.get('xpack.ccr.ui.enabled'), + ccrUiEnabled: ( + config.get('xpack.ccr.ui.enabled') + && config.get('xpack.remote_clusters.ui.enabled') + ), }; }, }, @@ -38,7 +41,13 @@ export function crossClusterReplication(kibana) { enabled: Joi.boolean().default(true), }).default(); }, - + isEnabled(config) { + return ( + config.get('xpack.ccr.enabled') && + config.get('xpack.index_management.enabled') && + config.get('xpack.remote_clusters.enabled') + ); + }, init: function initCcrPlugin(server) { registerLicenseChecker(server); registerRoutes(server); diff --git a/x-pack/plugins/remote_clusters/index.js b/x-pack/plugins/remote_clusters/index.js index 9962899c08a63..ea5b19a0cf7a5 100644 --- a/x-pack/plugins/remote_clusters/index.js +++ b/x-pack/plugins/remote_clusters/index.js @@ -44,7 +44,12 @@ export function remoteClusters(kibana) { enabled: Joi.boolean().default(true), }).default(); }, - + isEnabled(config) { + return ( + config.get('xpack.remote_clusters.enabled') && + config.get('xpack.index_management.enabled') + ); + }, init: function (server) { registerLicenseChecker(server); registerListRoute(server);