FINERACT-1724: Improvements around maker-checker check

This commit is contained in:
Adam Saghy
2023-03-31 09:14:40 +02:00
committed by Arnold Gálovics
parent 883761bd80
commit c8d7f9397b
@@ -60,16 +60,17 @@ public class ConfigurationDomainServiceJpa implements ConfigurationDomainService
if (StringUtils.isBlank(taskPermissionCode)) {
throw new PermissionNotFoundException(taskPermissionCode);
}
final Permission thisTask = this.permissionRepository.findOneByCode(taskPermissionCode);
if (thisTask == null) {
throw new PermissionNotFoundException(taskPermissionCode);
}
final String makerCheckerConfigurationProperty = "maker-checker";
final GlobalConfigurationPropertyData property = getGlobalConfigurationPropertyData(makerCheckerConfigurationProperty);
if (property.isEnabled()) {
final Permission thisTask = this.permissionRepository.findOneByCode(taskPermissionCode);
if (thisTask == null) {
throw new PermissionNotFoundException(taskPermissionCode);
}
return thisTask.hasMakerCheckerEnabled() && property.isEnabled();
return thisTask.hasMakerCheckerEnabled();
}
return false;
}
@Override