ref 18291: Modify the Accounting Dashboard portlet to support the Core

Services Category per gateway

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

Fixed infra nodes scope
This commit is contained in:
Giancarlo Panichi 2020-01-21 12:09:14 +01:00
parent e140afebe4
commit b8f99d099e
1 changed files with 8 additions and 7 deletions

View File

@ -110,8 +110,8 @@ public class PortalContextTreeProvider implements ContextTreeProvider {
currUser);
if (infraNode != null) {
String currScope = portalContext.getCurrentScope(gCubeGroup.getGroupId() + "");
ScopeDescriptor infraNodeScopeDescriptor = createRelativeInfraNode(infraNode, currScope);
String gatewayScope = String.valueOf(gCubeGroup.getGroupId());
ScopeDescriptor infraNodeScopeDescriptor = createRelativeInfraNode(infraNode, gatewayScope);
if (gatewayChildren != null) {
gatewayChildren.addFirst(infraNodeScopeDescriptor);
} else {
@ -156,15 +156,16 @@ public class PortalContextTreeProvider implements ContextTreeProvider {
PortalContext pContext = PortalContext.getConfiguration();
GCubeUser currUser = pContext.getCurrentUser(request);
String currScope = pContext.getCurrentScope(currentSiteGroupId + "");
InfraNode infraNode = BuildInfraNode.build(currScope);
String portalScope = pContext.getCurrentScope(currentSiteGroupId + "");
String gatewayScope = String.valueOf(currentSiteGroupId);
InfraNode infraNode = BuildInfraNode.build(portalScope);
LinkedList<ScopeDescriptor> rootChildren = null;
rootChildren = retrieveGatewayChildren(request, currentSiteGroupId, currUser);
if (infraNode != null) {
ScopeDescriptor infraNodeScopeDescriptor = createRelativeInfraNode(infraNode, currScope);
ScopeDescriptor infraNodeScopeDescriptor = createRelativeInfraNode(infraNode, gatewayScope);
if (rootChildren != null) {
rootChildren.addFirst(infraNodeScopeDescriptor);
} else {