Trims required group membership entries of whitespace
@@ -53,8 +53,13 @@ public class PermissionsController {
@ApiOperation(value = "", notes = "Get all application permissions. Internal use only.")
@RequestMapping(method = RequestMethod.GET, value = "/applications")
Set<Application.Permission> getAllApplicationPermissions() {
- Map<String, Application.Permission> actualPermissions = applicationPermissionDAO.all().collectEntries {
- [(it.name.toLowerCase()): it]
+ Map<String, Application.Permission> actualPermissions = applicationPermissionDAO.all().collectEntries { Application.Permission perm ->
+ if (perm.requiredGroupMembership) {
+ // Deck added trailing whitespace for a while, so this is now needed.
+ def copy = perm.requiredGroupMembership
+ perm.requiredGroupMembership = copy.collect { it.trim() }
+ }
+ return [(perm.name.toLowerCase()): perm]
}
applicationDAO.all().each {
