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