minor fix
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/gcube-ckan-datacatalog@130667 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
36898524ec
commit
1409810969
|
@ -56,10 +56,6 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
|
|||
|
||||
public final static String TEST_USER = "test.user";
|
||||
public final static String TEST_SCOPE = "/gcube/devsec/devVRE";
|
||||
// TO BE REMOVED TODO
|
||||
public final static String PRODUCTION_SCOPE_ROOT = "/d4science.research-infrastructures.eu";
|
||||
public final static String PRODUCTION_CKAN_ORGNAME_ROOT = "d4science";
|
||||
public final static String PRODUCTION_LIFERAY_ORGNAME_ROOT = "d4science";
|
||||
public final static String TEST_MAIL = "test.user@test-com";
|
||||
public final static String TEST_SEC_TOKEN = "4620e6d0-2313-4f48-9d54-eb3efd01a810";
|
||||
|
||||
|
@ -86,8 +82,8 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
|
|||
if(user.equals(TEST_USER)){
|
||||
// session expired or, maybe, outside the portal
|
||||
logger.warn("User is "+TEST_USER +" are we out from portal?");
|
||||
logger.warn("I'm using root scope "+PRODUCTION_SCOPE_ROOT);
|
||||
instance = new CKanUtilsImpl(PRODUCTION_SCOPE_ROOT);
|
||||
logger.warn("I'm using root scope "+ CKanUtilsImpl.PRODUCTION_SCOPE_ROOT);
|
||||
instance = new CKanUtilsImpl(CKanUtilsImpl.PRODUCTION_SCOPE_ROOT);
|
||||
}else{
|
||||
if(discoverScope != null && !discoverScope.isEmpty())
|
||||
instance = new CKanUtilsImpl(discoverScope);
|
||||
|
|
|
@ -7,6 +7,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import org.gcube.datacatalogue.ckanutillibrary.CKanUtils;
|
||||
import org.gcube.datacatalogue.ckanutillibrary.CKanUtilsImpl;
|
||||
import org.gcube.datacatalogue.ckanutillibrary.models.RolesIntoOrganization;
|
||||
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanRole;
|
||||
import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.OrganizationBean;
|
||||
|
@ -209,8 +210,7 @@ public class UserUtil {
|
|||
// get the orgs of the user
|
||||
List<CkanOrganization> ckanOrgs = ckanUtils.getOrganizationsByUser(username);
|
||||
for (CkanOrganization ckanOrganization : ckanOrgs) {
|
||||
if(gCubeGroupName.equals(GcubeCkanDataCatalogServiceImpl.PRODUCTION_LIFERAY_ORGNAME_ROOT) ||
|
||||
ckanOrganization.getName().equals(gCubeGroupName.toLowerCase())){
|
||||
if(ckanOrganization.getName().equals(gCubeGroupName.toLowerCase()) || ckanOrganization.getName().equals(CKanUtilsImpl.PRODUCTION_CKAN_ORGNAME_ROOT)){
|
||||
orgsInWhichAdminRole.add(new OrganizationBean(ckanOrganization.getTitle(), ckanOrganization.getName()));
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue