mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-30 15:11:38 +00:00
added check for existing system config when a feature is enabled
This commit is contained in:
@@ -29,12 +29,14 @@ public class FeatureValidationServiceBean implements FeatureValidatorService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkSystemConfig(String name, AServer server, FeatureValidationResult featureValidationResult) {
|
||||
public boolean checkSystemConfig(String name, AServer server, FeatureValidationResult featureValidationResult) {
|
||||
if(!configService.configExists(server, name)) {
|
||||
SystemConfigValidationError validationError = SystemConfigValidationError.builder().configKey(name).build();
|
||||
featureValidationResult.setValidationResult(false);
|
||||
featureValidationResult.getValidationErrors().add(validationError);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<#assign configKey>${error.templateModel['configKey']}</#assign><#include "config_key_not_setup_text">
|
||||
@@ -0,0 +1 @@
|
||||
<#assign postTargetKey>${error.templateModel['postTargetKey']}</#assign><#include "post_target_not_setup_text">
|
||||
Reference in New Issue
Block a user