ref 17169: Selection of users in the Sharing panel

https://support.d4science.org/issues/17169

Updated VREs by user discovery

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-sharing-widget@181373 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2019-07-31 13:45:24 +00:00
parent d66d46fc39
commit 310dfa05cf
1 changed files with 7 additions and 15 deletions

View File

@ -394,22 +394,13 @@ public class GWTWorkspaceSharingBuilder {
List<GCubeGroup> listOfGroups = getGroupManager().listGroupsByUser(userId); List<GCubeGroup> listOfGroups = getGroupManager().listGroupsByUser(userId);
if (listOfGroups != null && !listOfGroups.isEmpty()) { if (listOfGroups != null && !listOfGroups.isEmpty()) {
for (GCubeGroup gCubeGroup : listOfGroups) { for (GCubeGroup gCubeGroup : listOfGroups) {
// Get VOs // Test is VRE
List<GCubeGroup> voGroups = gCubeGroup.getChildren(); if (getGroupManager().isVRE(gCubeGroup.getGroupId())) {
if (voGroups != null && !voGroups.isEmpty()) { UserVRE gGroup = new UserVRE(gCubeGroup.getGroupId(), gCubeGroup.getParentGroupId(),
for (GCubeGroup voGroup : voGroups) { gCubeGroup.getGroupName(), gCubeGroup.getDescription());
// Get VREs contexts.add(gGroup);
List<GCubeGroup> vreGroups = voGroup.getChildren();
if (vreGroups != null && !vreGroups.isEmpty()) {
for (GCubeGroup vreGroup : vreGroups) {
UserVRE gGroup = new UserVRE(vreGroup.getGroupId(), vreGroup.getParentGroupId(),
vreGroup.getGroupName(), vreGroup.getDescription());
contexts.add(gGroup);
}
}
}
} }
} }
} }
@ -427,6 +418,7 @@ public class GWTWorkspaceSharingBuilder {
} }
} }
}); });
logger.debug("VRE retrieved: "+contexts.size());
return contexts; return contexts;
} catch (Exception e) { } catch (Exception e) {