From fca05edbd4fdf19884bd087007163a74922012dd Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Fri, 24 Apr 2015 09:51:01 -0400 Subject: [PATCH] add constant only used once to make it harder to read the code --- src/main/java/org/elasticsearch/bootstrap/Bootstrap.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java b/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java index 6d1652f2525..56643105dd5 100644 --- a/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java +++ b/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java @@ -92,8 +92,14 @@ public class Bootstrap { } } + /** + * option for elasticsearch.yml etc to turn off our security manager completely, + * for example if you want to have your own configuration or just disable. + */ + static final String SECURITY_SETTING = "security.manager.enabled"; + private void setupSecurity(Settings settings, Environment environment) throws Exception { - if (settings.getAsBoolean("security.manager.enabled", true)) { + if (settings.getAsBoolean(SECURITY_SETTING, true)) { Security.configure(environment); } }