From 59fdd54dbc212c50dc2b3b3831fc8844460b85e1 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Mon, 17 Aug 2015 13:44:59 +0200 Subject: [PATCH] Fixed compile error due to upstream change. Original commit: elastic/x-pack-elasticsearch@a07877571cd9bc7c0d2c1f2a3ba6863697ec5d50 --- .../java/org/elasticsearch/shield/ShieldPlugin.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/shield/src/main/java/org/elasticsearch/shield/ShieldPlugin.java b/shield/src/main/java/org/elasticsearch/shield/ShieldPlugin.java index 9c26ab09419..6100f2e57be 100644 --- a/shield/src/main/java/org/elasticsearch/shield/ShieldPlugin.java +++ b/shield/src/main/java/org/elasticsearch/shield/ShieldPlugin.java @@ -8,7 +8,8 @@ package org.elasticsearch.shield; import com.google.common.collect.ImmutableList; import org.elasticsearch.client.Client; import org.elasticsearch.client.support.Headers; -import org.elasticsearch.cluster.settings.ClusterDynamicSettingsModule; +import org.elasticsearch.cluster.ClusterModule; +import org.elasticsearch.cluster.settings.Validator; import org.elasticsearch.common.component.LifecycleComponent; import org.elasticsearch.common.inject.Module; import org.elasticsearch.common.settings.Settings; @@ -83,8 +84,12 @@ public class ShieldPlugin extends AbstractPlugin { return settingsBuilder.build(); } - public void onModule(ClusterDynamicSettingsModule clusterDynamicSettingsModule) { - clusterDynamicSettingsModule.addDynamicSettings("shield.transport.filter.*", "shield.http.filter.*", "transport.profiles.*", IPFilter.IP_FILTER_ENABLED_SETTING, IPFilter.IP_FILTER_ENABLED_HTTP_SETTING); + public void onModule(ClusterModule clusterDynamicSettingsModule) { + clusterDynamicSettingsModule.registerClusterDynamicSetting("shield.transport.filter.*", Validator.EMPTY); + clusterDynamicSettingsModule.registerClusterDynamicSetting("shield.http.filter.*", Validator.EMPTY); + clusterDynamicSettingsModule.registerClusterDynamicSetting("transport.profiles.*", Validator.EMPTY); + clusterDynamicSettingsModule.registerClusterDynamicSetting(IPFilter.IP_FILTER_ENABLED_SETTING, Validator.EMPTY); + clusterDynamicSettingsModule.registerClusterDynamicSetting(IPFilter.IP_FILTER_ENABLED_HTTP_SETTING, Validator.EMPTY); } private void addUserSettings(Settings.Builder settingsBuilder) {