removed forced mapping for production root organization
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/gcube-ckan-datacatalog@131367 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ab767fcc51
commit
521ca0bdad
|
@ -38,9 +38,7 @@ public class CkanFramePanel extends FlowPanel{
|
|||
*/
|
||||
public CkanFramePanel(HandlerManager eventBus) {
|
||||
this.eventBus = eventBus;
|
||||
this.add(loading);
|
||||
loading.getElement().getStyle().setProperty("margin", "auto");
|
||||
loading.getElement().getStyle().setDisplay(Display.BLOCK);
|
||||
addLoading();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -67,6 +65,8 @@ public class CkanFramePanel extends FlowPanel{
|
|||
print("Error " + e);
|
||||
}
|
||||
|
||||
addLoading();
|
||||
|
||||
frame = new Frame(ckanUrlConnector);
|
||||
frame.getElement().setId(GCubeCkanDataCatalog.GCUBE_CKAN_IFRAME);
|
||||
frame.setWidth("100%");
|
||||
|
@ -97,4 +97,13 @@ public class CkanFramePanel extends FlowPanel{
|
|||
public Frame getFrame() {
|
||||
return frame;
|
||||
}
|
||||
|
||||
/**
|
||||
* add loading image
|
||||
*/
|
||||
private void addLoading(){
|
||||
this.add(loading);
|
||||
loading.getElement().getStyle().setProperty("margin", "auto");
|
||||
loading.getElement().getStyle().setDisplay(Display.BLOCK);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ 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;
|
||||
|
@ -63,11 +62,11 @@ public class UserUtil {
|
|||
for (GCubeGroup gCubeGroup : listOfGroups) {
|
||||
|
||||
// TODO: why only the VRES??...however check for the production root vo
|
||||
if(gCubeGroup.getGroupName().equals(CKanUtilsImpl.PRODUCTION_LIFERAY_ORGNAME_ROOT))
|
||||
vreNames.add(CKanUtilsImpl.PRODUCTION_CKAN_ORGNAME_ROOT);
|
||||
// if(gCubeGroup.getGroupName().equals(CKanUtilsImpl.PRODUCTION_LIFERAY_ORGNAME_ROOT))
|
||||
// vreNames.add(CKanUtilsImpl.PRODUCTION_CKAN_ORGNAME_ROOT);
|
||||
|
||||
//if(groupManager.isVRE(gCubeGroup.getGroupId())) //Is it a VRE?
|
||||
else
|
||||
// else
|
||||
vreNames.add(gCubeGroup.getGroupName());
|
||||
}
|
||||
logger.debug("Returning VRE names: "+vreNames);
|
||||
|
@ -182,7 +181,7 @@ public class UserUtil {
|
|||
// get highest role
|
||||
RolesIntoOrganization correspondentRoleToCheck = getLiferayHighestRoleInOrg(roles);
|
||||
|
||||
// if it the role is ADMIN/EDITOR we have to be sure to set it
|
||||
//if it the role is ADMIN/EDITOR we have to be sure to set it
|
||||
if(correspondentRoleToCheck.equals(RolesIntoOrganization.ADMIN) || correspondentRoleToCheck.equals(RolesIntoOrganization.EDITOR)){
|
||||
|
||||
checkIfRoleIsSetInCkanInstance(username, groupName, currentGroupId,
|
||||
|
@ -229,7 +228,7 @@ public class UserUtil {
|
|||
// get the orgs of the user and retrieve its title and name
|
||||
List<CkanOrganization> ckanOrgs = ckanUtils.getOrganizationsByUser(username);
|
||||
for (CkanOrganization ckanOrganization : ckanOrgs) {
|
||||
if(ckanOrganization.getName().equals(gCubeGroupName.toLowerCase()) || ckanOrganization.getName().equals(CKanUtilsImpl.PRODUCTION_CKAN_ORGNAME_ROOT)){
|
||||
if(ckanOrganization.getName().equals(gCubeGroupName.toLowerCase())){// || ckanOrganization.getName().equals(CKanUtilsImpl.PRODUCTION_CKAN_ORGNAME_ROOT)){
|
||||
orgsInWhichAtLeastEditorRole.add(new OrganizationBean(ckanOrganization.getTitle(), ckanOrganization.getName()));
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue