mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 15:33:09 +00:00
Merge pull request #1662 from minurmin/DS-3463
[DS-3463] Fix IP authentication for anonymous users
This commit is contained in:
@@ -185,6 +185,15 @@ public class GroupServiceImpl extends DSpaceObjectServiceImpl<Group> implements
|
|||||||
//lookup eperson in normal groups and subgroups
|
//lookup eperson in normal groups and subgroups
|
||||||
return epersonInGroup(context, groupName, currentUser);
|
return epersonInGroup(context, groupName, currentUser);
|
||||||
} else {
|
} else {
|
||||||
|
// Check also for anonymous users if IP authentication used
|
||||||
|
List<Group> specialGroups = context.getSpecialGroups();
|
||||||
|
if(CollectionUtils.isNotEmpty(specialGroups)) {
|
||||||
|
for(Group specialGroup : specialGroups){
|
||||||
|
if (StringUtils.equals(specialGroup.getName(), groupName)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user