This commit is contained in:
Phillip Webb
2016-08-29 20:20:45 +01:00
parent 850141c405
commit 565ad79856
19 changed files with 151 additions and 137 deletions

View File

@@ -364,6 +364,7 @@ public class EndpointWebMvcChildContextConfiguration {
}
abstract void customize(T container);
}
static class TomcatAccessLogCustomizer

View File

@@ -188,8 +188,9 @@ public class HealthMvcEndpoint extends AbstractEndpointMvcAdapter<HealthEndpoint
}
if (isSpringSecurityAuthentication(principal)) {
Authentication authentication = (Authentication) principal;
List<String> roles = Arrays.asList(StringUtils.trimArrayElements(StringUtils
.commaDelimitedListToStringArray(this.roleResolver.getProperty("roles", "ROLE_ADMIN"))));
List<String> roles = Arrays.asList(StringUtils
.trimArrayElements(StringUtils.commaDelimitedListToStringArray(
this.roleResolver.getProperty("roles", "ROLE_ADMIN"))));
for (GrantedAuthority authority : authentication.getAuthorities()) {
String name = authority.getAuthority();
for (String role : roles) {