add constant only used once to make it harder to read the code

This commit is contained in:
Robert Muir 2015-04-24 09:51:01 -04:00
parent 2d778df4b4
commit fca05edbd4
1 changed files with 7 additions and 1 deletions

View File

@ -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 { 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); Security.configure(environment);
} }
} }