minor fix to get highestRole function

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@133973 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-11-08 22:12:37 +00:00
parent 001bf95ec2
commit 66ddef8d06
1 changed files with 7 additions and 1 deletions

View File

@ -136,7 +136,10 @@ public class Utils {
List<GCubeRole> roles = roleManager.listRolesByUserAndGroup(userid, groupManager.getGroupId(gCubeGroupName));
// get highest role according liferay
RolesCkanGroupOrOrg correspondentRoleToCheck = getLiferayHighestRoleInOrg(roles);
RolesCkanGroupOrOrg correspondentRoleToCheck = getLiferayHighestRoleInOrg(roles);
if(correspondentRoleToCheck.equals(RolesCkanGroupOrOrg.MEMBER))
continue;
checkIfRoleIsSetInCkanInstance(username, gCubeGroupName, gCubeGroup.getGroupId(), correspondentRoleToCheck, toReturn, groupManager, ckanPublisherServicesImpl);
}
@ -155,6 +158,9 @@ public class Utils {
// get highest role according liferay
RolesCkanGroupOrOrg correspondentRoleToCheck = getLiferayHighestRoleInOrg(roles);
if(correspondentRoleToCheck.equals(RolesCkanGroupOrOrg.MEMBER))
continue;
checkIfRoleIsSetInCkanInstance(username, gCubeGroupName, gCubeGroup.getGroupId(), correspondentRoleToCheck, toReturn, groupManager, ckanPublisherServicesImpl);
}