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:
parent
b8f99d099e
commit
58ccefa0b7
|
@ -110,8 +110,11 @@ public class PortalContextTreeProvider implements ContextTreeProvider {
|
||||||
currUser);
|
currUser);
|
||||||
|
|
||||||
if (infraNode != null) {
|
if (infraNode != null) {
|
||||||
String gatewayScope = String.valueOf(gCubeGroup.getGroupId());
|
StringBuilder gatewayScope=new StringBuilder();
|
||||||
ScopeDescriptor infraNodeScopeDescriptor = createRelativeInfraNode(infraNode, gatewayScope);
|
gatewayScope.append(infrastructureScope);
|
||||||
|
gatewayScope.append("/");
|
||||||
|
gatewayScope.append(gCubeGroup.getGroupName());
|
||||||
|
ScopeDescriptor infraNodeScopeDescriptor = createRelativeInfraNode(infraNode, gatewayScope.toString());
|
||||||
if (gatewayChildren != null) {
|
if (gatewayChildren != null) {
|
||||||
gatewayChildren.addFirst(infraNodeScopeDescriptor);
|
gatewayChildren.addFirst(infraNodeScopeDescriptor);
|
||||||
} else {
|
} else {
|
||||||
|
@ -152,20 +155,26 @@ public class PortalContextTreeProvider implements ContextTreeProvider {
|
||||||
throws Exception, PortalException, SystemException {
|
throws Exception, PortalException, SystemException {
|
||||||
ScopeDescriptor root;
|
ScopeDescriptor root;
|
||||||
|
|
||||||
long currentSiteGroupId = getSiteFromServletRequest(request).getGroupId();
|
Group group=getSiteFromServletRequest(request);
|
||||||
|
long currentSiteGroupId = group.getGroupId();
|
||||||
|
String gatewayName=group.getName();
|
||||||
|
|
||||||
PortalContext pContext = PortalContext.getConfiguration();
|
PortalContext pContext = PortalContext.getConfiguration();
|
||||||
GCubeUser currUser = pContext.getCurrentUser(request);
|
GCubeUser currUser = pContext.getCurrentUser(request);
|
||||||
String portalScope = pContext.getCurrentScope(currentSiteGroupId + "");
|
String portalScope = pContext.getCurrentScope(currentSiteGroupId + "");
|
||||||
String gatewayScope = String.valueOf(currentSiteGroupId);
|
|
||||||
|
|
||||||
|
StringBuilder gatewayScope=new StringBuilder();
|
||||||
|
gatewayScope.append(portalScope);
|
||||||
|
gatewayScope.append("/");
|
||||||
|
gatewayScope.append(gatewayName);
|
||||||
|
|
||||||
InfraNode infraNode = BuildInfraNode.build(portalScope);
|
InfraNode infraNode = BuildInfraNode.build(portalScope);
|
||||||
|
|
||||||
LinkedList<ScopeDescriptor> rootChildren = null;
|
LinkedList<ScopeDescriptor> rootChildren = null;
|
||||||
rootChildren = retrieveGatewayChildren(request, currentSiteGroupId, currUser);
|
rootChildren = retrieveGatewayChildren(request, currentSiteGroupId, currUser);
|
||||||
|
|
||||||
if (infraNode != null) {
|
if (infraNode != null) {
|
||||||
ScopeDescriptor infraNodeScopeDescriptor = createRelativeInfraNode(infraNode, gatewayScope);
|
ScopeDescriptor infraNodeScopeDescriptor = createRelativeInfraNode(infraNode, gatewayScope.toString());
|
||||||
if (rootChildren != null) {
|
if (rootChildren != null) {
|
||||||
rootChildren.addFirst(infraNodeScopeDescriptor);
|
rootChildren.addFirst(infraNodeScopeDescriptor);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue