diff --git a/distro/changelog.xml b/distro/changelog.xml index 8f177e0..21d2f84 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,9 +1,10 @@ + Updated Info Panel to show only VRE info [ticket: #17434] Added support to workspace users discovery by VREs [ticket: #17169] Added support for users in different Gateway [ticket: #17080] - Update the list of shared classes with the tree widget + Updated the list of shared classes with the tree widget diff --git a/src/main/java/org/gcube/portlets/widgets/workspacesharingwidget/server/GWTWorkspaceSharingBuilder.java b/src/main/java/org/gcube/portlets/widgets/workspacesharingwidget/server/GWTWorkspaceSharingBuilder.java index d5dbc9b..9931027 100644 --- a/src/main/java/org/gcube/portlets/widgets/workspacesharingwidget/server/GWTWorkspaceSharingBuilder.java +++ b/src/main/java/org/gcube/portlets/widgets/workspacesharingwidget/server/GWTWorkspaceSharingBuilder.java @@ -47,6 +47,7 @@ import org.gcube.vomanagement.usermanagement.model.GCubeUser; import org.slf4j.Logger; import org.slf4j.LoggerFactory; + /** * The Class GWTWorkspaceSharingBuilder. * @@ -417,7 +418,7 @@ public class GWTWorkspaceSharingBuilder { } } }); - logger.debug("VRE retrieved: "+contexts.size()); + logger.debug("VRE retrieved: " + contexts.size()); return contexts; } catch (Exception e) { @@ -805,7 +806,11 @@ public class GWTWorkspaceSharingBuilder { String html = "
"; - logger.trace("Formatting " + acls.size() + " ACL/s"); + logger.info("ACL/s found " + acls.size()); + PortalContext context = PortalContext.getConfiguration(); + + logger.info("context.getInfrastructureName(): " + context.getInfrastructureName()); + String infrastructureName = context.getInfrastructureName(); Map> aclOwner = new HashMap<>(); @@ -840,15 +845,29 @@ public class GWTWorkspaceSharingBuilder { for (String login : listLogins) { logger.trace("Adding login " + login); String fullName = UserUtil.getUserFullName(login); - if (fullName != null && !fullName.isEmpty()) - html += fullName + "; "; - else + if (fullName != null && !fullName.isEmpty()) { + if (infrastructureName != null && !infrastructureName.isEmpty() + && fullName.startsWith(infrastructureName) && infrastructureName.length()-1&&fullName.length()>indexOfFirstDash){ + fullName = fullName.substring(indexOfFirstDash+1); + html += fullName + "; "; + } else { + html += fullName + "; "; + } + } else { + html += fullName + "; "; + } + } else { html += login + "; "; + } } html += "
"; } html += "
"; + logger.info("Retrieved: " + html); return html; }