Skip to content

Commit

Permalink
Merged in SHIBUI-1649 (pull request #435)
Browse files Browse the repository at this point in the history
SHIBUI-1649
  • Loading branch information
dima767 authored and rmathis committed Nov 21, 2019
2 parents ef8a39a + 5dabd08 commit abfbe25
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import javax.script.ScriptException;

@SpringBootApplication
@ComponentScan(excludeFilters = @ComponentScan.Filter(type = FilterType.REGEX, pattern = "edu.internet2.tier.shibboleth.admin.ui.configuration.auto.*"))
@EntityScan(basePackages = {"edu.internet2.tier.shibboleth.admin.ui.domain", "edu.internet2.tier.shibboleth.admin.ui.envers", "edu.internet2.tier.shibboleth.admin.ui.security.model"})
Expand Down Expand Up @@ -69,7 +71,16 @@ public void initializeResolvers(ApplicationStartedEvent e) {
metadataResolverRepository.findAll()
.forEach(it -> {
logger.info(String.format("Reloading filters for resolver [%s: %s]", it.getName(), it.getResourceId()));
metadataResolverService.reloadFilters(it.getResourceId());
try {
metadataResolverService.reloadFilters(it.getResourceId());
}
catch (Throwable ex) {
if(ex instanceof ScriptException) {
logger.warn("Caught invalid script parsing error. Please fix the script data.", ex);
return;
}
throw ex;
}
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public ResponseEntity<?> create(@PathVariable String metadataResolverId, @Reques
}

@PutMapping("/Filters/{resourceId}")
@Transactional
public ResponseEntity<?> update(@PathVariable String metadataResolverId,
@PathVariable String resourceId,
@RequestBody MetadataFilter updatedFilter) {
Expand Down

0 comments on commit abfbe25

Please sign in to comment.