view per vre doesn't follow the context written into the the resource DataCatalogueUrlToContext map. It is directly read from the current context

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/gcube-ckan-datacatalog@162019 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2018-01-09 15:02:36 +00:00
parent 79e0fb0405
commit 2a325c457d
1 changed files with 3 additions and 1 deletions

View File

@ -13,6 +13,7 @@ import javax.servlet.http.HttpSession;
import org.apache.commons.codec.binary.Base64;
import org.gcube.common.authorization.client.exceptions.ObjectNotFound;
import org.gcube.common.authorization.library.provider.UserInfo;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.datacatalogue.ckanutillibrary.server.DataCatalogue;
import org.gcube.datacatalogue.ckanutillibrary.server.DataCatalogueFactory;
import org.gcube.datacatalogue.ckanutillibrary.server.utils.SessionCatalogueAttributes;
@ -551,7 +552,8 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
public String isViewPerVREEnabled(){
String toReturn = null;
String scopePerCurrentUrl = SessionUtil.getScopeFromClientUrl(getThreadLocalRequest());
String scopePerCurrentUrl = ScopeProvider.instance.get();// the view per vre can be managed independently for each context SessionUtil.getScopeFromClientUrl(getThreadLocalRequest());
logger.debug("Read contest for isViewPerVREEnabled() " + scopePerCurrentUrl);
boolean enabled = false;
try{
GroupManager gm = new LiferayGroupManager();