handle another array prop

This commit is contained in:
Terry Brady
2016-02-03 15:07:00 -08:00
parent 7f5e444047
commit bcfe75dbef

View File

@@ -303,7 +303,7 @@ public class ShibAuthentication implements AuthenticationMethod
} }
log.debug("Starting to determine special groups"); log.debug("Starting to determine special groups");
String defaultRoles = configurationService.getProperty("authentication-shibboleth.default-roles"); String[] defaultRoles = configurationService.getArrayProperty("authentication-shibboleth.default-roles");
String roleHeader = configurationService.getProperty("authentication-shibboleth.role-header"); String roleHeader = configurationService.getProperty("authentication-shibboleth.role-header");
boolean ignoreScope = configurationService.getBooleanProperty("authentication-shibboleth.role-header.ignore-scope", true); boolean ignoreScope = configurationService.getBooleanProperty("authentication-shibboleth.role-header.ignore-scope", true);
boolean ignoreValue = configurationService.getBooleanProperty("authentication-shibboleth.role-header.ignore-value", false); boolean ignoreValue = configurationService.getBooleanProperty("authentication-shibboleth.role-header.ignore-value", false);
@@ -316,8 +316,8 @@ public class ShibAuthentication implements AuthenticationMethod
List<String> affiliations = findMultipleAttributes(request, roleHeader); List<String> affiliations = findMultipleAttributes(request, roleHeader);
if (affiliations == null) { if (affiliations == null) {
if (defaultRoles != null) if (defaultRoles != null)
affiliations = Arrays.asList(defaultRoles.split(",")); affiliations = Arrays.asList(defaultRoles);
log.debug("Failed to find Shibboleth role header, '"+roleHeader+"', falling back to the default roles: '"+defaultRoles+"'"); log.debug("Failed to find Shibboleth role header, '"+roleHeader+"', falling back to the default roles: '"+String.join(",", defaultRoles) +"'");
} else { } else {
log.debug("Found Shibboleth role header: '"+roleHeader+"' = '"+affiliations+"'"); log.debug("Found Shibboleth role header: '"+roleHeader+"' = '"+affiliations+"'");
} }
@@ -351,7 +351,7 @@ public class ShibAuthentication implements AuthenticationMethod
log.debug("Unable to find role mapping for the value, '"+affiliation+"', there should be a mapping in config/modules/authentication-shibboleth.cfg: role."+affiliation+" = <some group name>"); log.debug("Unable to find role mapping for the value, '"+affiliation+"', there should be a mapping in config/modules/authentication-shibboleth.cfg: role."+affiliation+" = <some group name>");
continue; continue;
} else { } else {
log.debug("Mapping role affiliation to DSpace group: '"+groupNames+"'"); log.debug("Mapping role affiliation to DSpace group: '"+String.join(",",groupNames)+"'");
} }
// Add each group to the list. // Add each group to the list.
@@ -923,7 +923,7 @@ public class ShibAuthentication implements AuthenticationMethod
return; return;
} }
log.debug("Loading additional eperson metadata from: 'authentication.shib.eperson.metadata' = '"+mappingString+"'"); log.debug("Loading additional eperson metadata from: 'authentication.shib.eperson.metadata' = '"+String.join(",", mappingString) +"'");
for (String metadataString : mappingString) { for (String metadataString : mappingString) {