Skip to content

Commit

Permalink
fix(rest): make group query in check auth resource unlimited
Browse files Browse the repository at this point in the history
related to CAM-11148
  • Loading branch information
tasso94 authored and tmetzke committed Dec 9, 2019
1 parent 1552648 commit 1a8bc04
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,15 @@ protected IdentityService getIdentityService() {
}

protected List<String> getUserGroups(String userId) {
List<String> groupIds= new ArrayList<>();
List<Group> userGroups = getIdentityService().createGroupQuery().groupMember(userId).list();
List<Group> userGroups = getIdentityService().createGroupQuery()
.groupMember(userId)
.unlimitedList();

List<String> groupIds = new ArrayList<>();
for (Group group : userGroups) {
groupIds.add(group.getId());
}

return groupIds;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ protected List<String> setupGroupQueryMock() {
List<Group> groupMocks = MockProvider.createMockGroups();
when(identityServiceMock.createGroupQuery()).thenReturn(mockGroupQuery);
when(mockGroupQuery.groupMember(anyString())).thenReturn(mockGroupQuery);
when(mockGroupQuery.list()).thenReturn(groupMocks);
when(mockGroupQuery.unlimitedList()).thenReturn(groupMocks);
List<String> groupIds = new ArrayList<String>();
for (Group group : groupMocks) {
groupIds.add(group.getId());
Expand Down

0 comments on commit 1a8bc04

Please sign in to comment.