diff --git a/src/main/java/org/gcube/portlets/user/accountingdashboard/server/accounting/PortalContextTreeProvider.java b/src/main/java/org/gcube/portlets/user/accountingdashboard/server/accounting/PortalContextTreeProvider.java index ddce2aa..9acaa02 100644 --- a/src/main/java/org/gcube/portlets/user/accountingdashboard/server/accounting/PortalContextTreeProvider.java +++ b/src/main/java/org/gcube/portlets/user/accountingdashboard/server/accounting/PortalContextTreeProvider.java @@ -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 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 {