minor fix in utils class

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/gcube-ckan-datacatalog@131765 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-09-23 16:49:04 +00:00
parent d81fa0499f
commit 229e66c08c
1 changed files with 2 additions and 3 deletions

View File

@ -181,14 +181,12 @@ 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(correspondentRoleToCheck.equals(RolesIntoOrganization.ADMIN) || correspondentRoleToCheck.equals(RolesIntoOrganization.EDITOR)){
checkIfRoleIsSetInCkanInstance(username, groupName, currentGroupId,
correspondentRoleToCheck, groupManager, gcubeCkanDataCatalogServiceImpl, orgsInWhichAtLeastEditorRole);
toReturn = mapRolesIntoOrganizationToCkanRole(correspondentRoleToCheck);
//}
}
}catch(Exception e){
logger.error("Unable to retrieve the role information for this user. Returning member role", e);
@ -224,6 +222,7 @@ public class UserUtil {
// if there is an instance of ckan in this scope..
if(ckanUtils != null){
boolean res = ckanUtils.checkRole(username, gCubeGroupName, correspondentRoleToCheck);
if(res && !correspondentRoleToCheck.equals(RolesIntoOrganization.MEMBER)){
// get the orgs of the user and retrieve its title and name
List<CkanOrganization> ckanOrgs = ckanUtils.getOrganizationsByUser(username);