git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/sbd-uploadshare-portlet@169391 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
90c34bb49a
commit
446b3b7d82
|
@ -37,6 +37,7 @@ import org.gcube.common.scope.api.ScopeProvider;
|
||||||
import org.gcube.portal.notifications.bean.GenericItemBean;
|
import org.gcube.portal.notifications.bean.GenericItemBean;
|
||||||
import org.gcube.portal.notifications.thread.MessageNotificationsThread;
|
import org.gcube.portal.notifications.thread.MessageNotificationsThread;
|
||||||
import org.gcube.vomanagement.usermanagement.exception.RoleRetrievalFault;
|
import org.gcube.vomanagement.usermanagement.exception.RoleRetrievalFault;
|
||||||
|
import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
|
||||||
import org.gcube.vomanagement.usermanagement.impl.LiferayRoleManager;
|
import org.gcube.vomanagement.usermanagement.impl.LiferayRoleManager;
|
||||||
import org.gcube.vomanagement.usermanagement.impl.LiferayUserManager;
|
import org.gcube.vomanagement.usermanagement.impl.LiferayUserManager;
|
||||||
import org.gcube.vomanagement.usermanagement.model.GCubeUser;
|
import org.gcube.vomanagement.usermanagement.model.GCubeUser;
|
||||||
|
@ -100,18 +101,17 @@ public class RequestVRE extends MVCPortlet {
|
||||||
long infraManagerRoleId = -1;
|
long infraManagerRoleId = -1;
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
if (theManagers == null || theManagers.isEmpty()) {
|
if (theManagers == null || theManagers.isEmpty()) {
|
||||||
|
String rootVoName = PortalContext.getConfiguration().getInfrastructureName();
|
||||||
|
long therootGroupId = new LiferayGroupManager().getGroupIdFromInfrastructureScope("/"+rootVoName);
|
||||||
try {
|
try {
|
||||||
infraManagerRoleId = roleManager.getRoleIdByName("Administrator");
|
infraManagerRoleId = roleManager.getRoleIdByName(GatewayRolesNames.INFRASTRUCTURE_MANAGER.getRoleName());
|
||||||
|
theManagers = userManager.listUsersByGroupAndRole(therootGroupId, infraManagerRoleId);
|
||||||
}
|
}
|
||||||
catch (RoleRetrievalFault e) {
|
catch (RoleRetrievalFault e) {
|
||||||
_log.warn("There is no (Site) Role " + infraManagerRoleId + " in this portal. Will not notify about this vre request");
|
_log.warn("There are no users with (Site) Role " + infraManagerRoleId + " on " + rootVoName + " in this portal. Will not notify about this vre request");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
theManagers = userManager.listUsersByGlobalRole(infraManagerRoleId);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (theManagers == null || theManagers.isEmpty()) {
|
if (theManagers == null || theManagers.isEmpty()) {
|
||||||
_log.warn("There are no users with (Site) Role " + infraManagerRoleId + " on this portal. Will not notify about this vre request.");
|
_log.warn("There are no users with (Site) Role " + infraManagerRoleId + " on this portal. Will not notify about this vre request.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue