diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
index dd7b8bb..5fe3680 100644
--- a/.settings/org.eclipse.wst.common.component
+++ b/.settings/org.eclipse.wst.common.component
@@ -4,12 +4,6 @@
-
- uses
-
-
- uses
-
diff --git a/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/server/GcubeCkanDataCatalogServiceImpl.java b/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/server/GcubeCkanDataCatalogServiceImpl.java
index 3f322b1..a5e1b4d 100644
--- a/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/server/GcubeCkanDataCatalogServiceImpl.java
+++ b/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/server/GcubeCkanDataCatalogServiceImpl.java
@@ -101,7 +101,7 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
logger.debug("returning ckanConnectorUri: "+ckAP);
return ckAP;
}catch(Exception e ){
- String message = "Sorry an error occurred during contacting gCube Ckan Data Catalogue";
+ String message = "Sorry an error occurred while contacting gCube Ckan Data Catalogue";
logger.error(message, e);
throw new Exception(message);
}
@@ -169,7 +169,7 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
Map roleForVre = UserUtil.getVreRoleForUser(
SessionUtil.getCurrentUser(getThreadLocalRequest()).getEmail(),
scopePerCurrentUrl,
- getCatalogue(scopePerCurrentUrl));
+ getCatalogue(scopePerCurrentUrl), isViewPerVREEnabled() != null);
ckan.addListOfVREs(roleForVre);
return ckan;
diff --git a/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/server/UserUtil.java b/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/server/UserUtil.java
index 80d48d4..c5555ea 100644
--- a/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/server/UserUtil.java
+++ b/src/main/java/org/gcube/portlets/gcubeckan/gcubeckandatacatalog/server/UserUtil.java
@@ -47,9 +47,10 @@ public class UserUtil {
* Gets the list vre for user and the role the user has in them.
* retrieve the groups to whom a given user belongs (given the user EMail)
* @param userEMail the user e mail
+ * @param pathVre
* @return the list vre for user
*/
- public static Map getVreRoleForUser(String userEMail, String context, DataCatalogue instance){
+ public static Map getVreRoleForUser(String userEMail, String context, DataCatalogue instance, boolean isViewPerVREEnabled){
GroupManager groupManager = new LiferayGroupManager();
UserManager userManager = new LiferayUserManager();
@@ -99,7 +100,11 @@ public class UserUtil {
instance.assignRolesOtherOrganization(user.getUsername(),
vre.getGroupName().toLowerCase(),
RolesCkanGroupOrOrg.convertFromCapacity(localRole));
- }else
+
+ if(isViewPerVREEnabled)
+ break;
+
+ }else if(!isViewPerVREEnabled)
mapRoleByGroupExtrasVre.put(vre.getGroupName().toLowerCase(),
RolesCkanGroupOrOrg.convertToCkanCapacity(getLiferayHighestRoleInOrg(roleManager.listRolesByUserAndGroup(user.getUserId(), vre.getGroupId()))));
}