[DS-3431] Harden DSpace's BasicWorfklowService

This commit is contained in:
Pascal-Nicolas Becker
2017-04-18 17:06:55 +02:00
committed by Tim Donohue
parent b0ed059ab5
commit 04ec199ff3
23 changed files with 4740 additions and 290 deletions

View File

@@ -190,7 +190,7 @@ public class GroupServiceImpl extends DSpaceObjectServiceImpl<Group> implements
//If we have an ePerson, check we can find membership in the database
if(ePerson != null) {
//lookup eperson in normal groups and subgroups with 1 query
isMember = isEPersonInGroup(context, group.getName(), ePerson);
isMember = isEPersonInGroup(context, group, ePerson);
}
//If we did not find the group membership in the database, check the special groups.
@@ -539,10 +539,10 @@ public class GroupServiceImpl extends DSpaceObjectServiceImpl<Group> implements
protected boolean isEPersonInGroup(Context context, String groupName, EPerson ePerson)
protected boolean isEPersonInGroup(Context context, Group group, EPerson ePerson)
throws SQLException
{
return groupDAO.findByNameAndMembership(context, groupName, ePerson) != null;
return groupDAO.findByIdAndMembership(context, group.getID(), ePerson) != null;
}