Skip to content

Commit

Permalink
fix #10683
Browse files Browse the repository at this point in the history
  • Loading branch information
svuillet committed May 15, 2019
1 parent 5bad0e7 commit 475232e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Expand Up @@ -69,6 +69,7 @@
import org.exolab.castor.jdo.OQLQuery;
import org.exolab.castor.jdo.PersistenceException;
import org.exolab.castor.jdo.QueryResults;
import org.silverpeas.core.admin.OrganisationControllerFactory;

/**
* This class is one implementation of interface UpdatableProcessInstance. It uses Castor library
Expand Down Expand Up @@ -1460,8 +1461,10 @@ public String[] getAssignedStates(User user, String roleName) throws WorkflowExc
boolean userGroupsMatch = false;
if (StringUtil.isDefined(wkUser.getGroupId())) {
// check if one of userGroups matches with working group
if (user.getGroupIds() != null) {
userGroupsMatch = user.getGroupIds().contains(wkUser.getGroupId());
List<String> groupIds = Arrays.asList(OrganisationControllerFactory.getOrganisationController()
.getAllGroupIdsOfUser(wkUser.getId()));
if (groupIds != null) {
userGroupsMatch = groupIds.contains(wkUser.getGroupId());
}
}

Expand Down
Expand Up @@ -184,11 +184,6 @@ private User[] getUsers(UserDetail[] userDetails) {
UserImpl[] users = new UserImpl[userDetails.length];
for (int i = 0; i < userDetails.length; i++) {
users[i] = new UserImpl(userDetails[i]);
String[] groupIds = OrganisationControllerFactory.getOrganisationController()
.getAllGroupIdsOfUser(userDetails[i].getId());
if (groupIds != null) {
users[i].setGroupIds(Arrays.asList(groupIds));
}
}
return users;
}
Expand Down

0 comments on commit 475232e

Please sign in to comment.