You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by md...@apache.org on 2020/03/11 17:00:06 UTC
[syncope] branch master updated: [SYNCOPE-1547] customize the roles
to be displayed
This is an automated email from the ASF dual-hosted git repository.
mdisabatino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/master by this push:
new 479710f [SYNCOPE-1547] customize the roles to be displayed
479710f is described below
commit 479710fdb425f1919695391b4b7e45374358554b
Author: Marco Di Sabatino Di Diodoro <ma...@tirasa.net>
AuthorDate: Wed Mar 11 17:02:33 2020 +0100
[SYNCOPE-1547] customize the roles to be displayed
---
.../org/apache/syncope/client/console/wizards/any/Roles.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java
index ceda3a0..5997342 100644
--- a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java
+++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/Roles.java
@@ -78,10 +78,7 @@ public class Roles extends WizardStep implements ICondition {
this.setOutputMarkupId(true);
- allRoles = SyncopeWebApplication.get().getSecuritySettings().getAuthorizationStrategy().
- isActionAuthorized(this, RENDER)
- ? RoleRestClient.list().stream().map(RoleTO::getKey).sorted().collect(Collectors.toList())
- : List.of();
+ allRoles = getManagedRoles();
add(new AjaxPalettePanel.Builder<String>().
withFilter().
@@ -124,4 +121,11 @@ public class Roles extends WizardStep implements ICondition {
&& SyncopeWebApplication.get().getSecuritySettings().getAuthorizationStrategy().
isActionAuthorized(this, RENDER);
}
+
+ protected List<String> getManagedRoles() {
+ return SyncopeWebApplication.get().getSecuritySettings().getAuthorizationStrategy().
+ isActionAuthorized(this, RENDER)
+ ? RoleRestClient.list().stream().map(RoleTO::getKey).sorted().collect(Collectors.toList())
+ : List.of();
+ }
}