You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2019/12/04 07:32:43 UTC

[syncope] branch 2_1_X updated: white noise: small cleanup

This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch 2_1_X
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/2_1_X by this push:
     new 7b22224  white noise: small cleanup
7b22224 is described below

commit 7b2222495f32fe2be482a51820883e6b5ae88739
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Wed Dec 4 08:30:05 2019 +0100

    white noise: small cleanup
---
 .../java/org/apache/syncope/client/console/wizards/any/Roles.java  | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java
index fd05ced..f7437cd 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java
@@ -29,7 +29,7 @@ import org.apache.syncope.client.console.rest.RoleRestClient;
 import org.apache.syncope.client.console.wicket.ajax.markup.html.LabelInfo;
 import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPalettePanel;
 import org.apache.syncope.common.lib.to.AnyTO;
-import org.apache.syncope.common.lib.to.EntityTO;
+import org.apache.syncope.common.lib.to.RoleTO;
 import org.apache.syncope.common.lib.to.UserTO;
 import org.apache.syncope.common.lib.types.StandardEntitlement;
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.ActionPermissions;
@@ -67,7 +67,7 @@ public class Roles extends WizardStep implements ICondition {
         // -----------------------------------------------------------------
         // Pre-Authorizations
         // -----------------------------------------------------------------
-        final ActionPermissions permissions = new ActionPermissions();
+        ActionPermissions permissions = new ActionPermissions();
         setMetaData(MetaDataRoleAuthorizationStrategy.ACTION_PERMISSIONS, permissions);
         permissions.authorize(RENDER,
                 new org.apache.wicket.authroles.authorization.strategies.role.Roles(StandardEntitlement.ROLE_LIST));
@@ -77,9 +77,8 @@ public class Roles extends WizardStep implements ICondition {
 
         allRoles = SyncopeConsoleApplication.get().getSecuritySettings().getAuthorizationStrategy().
                 isActionAuthorized(this, RENDER)
-                ? new RoleRestClient().list().stream().map(EntityTO::getKey).collect(Collectors.toList())
+                ? new RoleRestClient().list().stream().map(RoleTO::getKey).sorted().collect(Collectors.toList())
                 : Collections.<String>emptyList();
-        Collections.sort(allRoles);
 
         add(new AjaxPalettePanel.Builder<String>().
                 withFilter().