minor fix

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@129727 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-06-30 17:20:59 +00:00
parent 30050a874b
commit 6d4de95867
1 changed files with 4 additions and 3 deletions

View File

@ -3476,6 +3476,9 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
// we need to iterate over vres of the user
List<GCubeGroup> groups = groupManager.listGroupsByUser(userManager.getUserId(username));
// user id
long userid = userManager.getUserId(username);
workspaceLogger.debug("The list of organizations of the user " + username + " is " + groups);
boolean toReturn = false;
@ -3488,7 +3491,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
if(!groupManager.isVRE(gCubeGroup.getGroupId()))
continue;
List<GCubeRole> roles = roleManager.listRolesByUserAndGroup(userManager.getUserId(username), groupManager.getGroupId(groupName));
List<GCubeRole> roles = roleManager.listRolesByUserAndGroup(userid, groupManager.getGroupId(groupName));
// the default one
RolesIntoOrganization correspondentRoleToCheck = RolesIntoOrganization.MEMBER;
@ -3527,8 +3530,6 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
workspaceLogger.error("Unable to retrieve the role information for this user. Returning FALSE", e);
}
workspaceLogger.debug("Unable to check the role into ckan organization, returning FALSE");
// set the role member into the asl
asl.setAttribute(CKAN_ROLE, false);