mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 07:23:08 +00:00
[DS-3431] Harden DSpace's BasicWorfklowService
This commit is contained in:

committed by
Tim Donohue

parent
b0ed059ab5
commit
04ec199ff3
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user