From 2a538f9d58c6f9d3acf8005c8fda4978a1851c47 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 28 Nov 2013 03:03:52 +0000 Subject: [PATCH] [MRM-1764] #users > edit roles -- please sort repository list for ease of use git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1546261 13f79535-47bb-0310-9956-ffa450edef68 --- .../rest/services/DefaultRoleManagementService.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultRoleManagementService.java b/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultRoleManagementService.java index 3c5f9501..31197c0e 100644 --- a/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultRoleManagementService.java +++ b/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultRoleManagementService.java @@ -631,7 +631,11 @@ public class DefaultRoleManagementService Collection appRoles = filterApplicationRoles( modelApplication, allRoles, modelApplication.getTemplates() ); - applicationRoles.setGlobalRoles( toRoleNames( appRoles ) ); + List roleNames = new ArrayList( toRoleNames( appRoles ) ); + + Collections.sort( roleNames ); + + applicationRoles.setGlobalRoles( roleNames ); Set resources = discoverResources( modelApplication.getTemplates(), appRoles ); @@ -651,8 +655,12 @@ public class DefaultRoleManagementService } } + Collections.sort( appRoleNames ); + applicationRoles.setGlobalRoles( appRoleNames ); + Collections.sort( appRoleNames ); + applicationRolesList.add( applicationRoles ); }