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:
parent
d66d46fc39
commit
310dfa05cf
|
@ -394,24 +394,15 @@ 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
|
|
||||||
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);
|
contexts.add(gGroup);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Collections.sort(contexts, new Comparator<UserVRE>() {
|
Collections.sort(contexts, new Comparator<UserVRE>() {
|
||||||
|
|
||||||
|
@ -427,6 +418,7 @@ public class GWTWorkspaceSharingBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
logger.debug("VRE retrieved: "+contexts.size());
|
||||||
return contexts;
|
return contexts;
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue