minor fix on role retrieval
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@142014 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
0634fb1b41
commit
9ee1f9c38a
|
@ -156,12 +156,7 @@ public class Utils {
|
||||||
checkIfRoleIsSetInCkanInstance(username, gCubeGroupName, gCubeGroup.getGroupId(),
|
checkIfRoleIsSetInCkanInstance(username, gCubeGroupName, gCubeGroup.getGroupId(),
|
||||||
correspondentRoleToCheck, groupManager, gcubeCkanDataCatalogServiceImpl, orgsInWhichAtLeastEditorRole);
|
correspondentRoleToCheck, groupManager, gcubeCkanDataCatalogServiceImpl, orgsInWhichAtLeastEditorRole);
|
||||||
|
|
||||||
if(toReturn.equals(RolesCkanGroupOrOrg.ADMIN))
|
toReturn = RolesCkanGroupOrOrg.getHigher(toReturn, correspondentRoleToCheck);
|
||||||
continue;
|
|
||||||
else if(toReturn.equals(RolesCkanGroupOrOrg.EDITOR) && correspondentRoleToCheck.equals(RolesCkanGroupOrOrg.ADMIN))
|
|
||||||
toReturn = RolesCkanGroupOrOrg.ADMIN;
|
|
||||||
else // it was MEMBER
|
|
||||||
toReturn = correspondentRoleToCheck;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,12 +181,7 @@ public class Utils {
|
||||||
checkIfRoleIsSetInCkanInstance(username, gCubeGroupName, gCubeGroup.getGroupId(),
|
checkIfRoleIsSetInCkanInstance(username, gCubeGroupName, gCubeGroup.getGroupId(),
|
||||||
correspondentRoleToCheck, groupManager, gcubeCkanDataCatalogServiceImpl, orgsInWhichAtLeastEditorRole);
|
correspondentRoleToCheck, groupManager, gcubeCkanDataCatalogServiceImpl, orgsInWhichAtLeastEditorRole);
|
||||||
|
|
||||||
if(toReturn.equals(RolesCkanGroupOrOrg.ADMIN))
|
toReturn = RolesCkanGroupOrOrg.getHigher(toReturn, correspondentRoleToCheck);
|
||||||
continue;
|
|
||||||
else if(toReturn.equals(RolesCkanGroupOrOrg.EDITOR) && correspondentRoleToCheck.equals(RolesCkanGroupOrOrg.ADMIN))
|
|
||||||
toReturn = RolesCkanGroupOrOrg.ADMIN;
|
|
||||||
else
|
|
||||||
toReturn = correspondentRoleToCheck;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if(groupManager.isVRE(currentGroupId)){
|
}else if(groupManager.isVRE(currentGroupId)){
|
||||||
|
|
Loading…
Reference in New Issue