Skip to content

Commit

Permalink
fix(ldap): query groups by groupIdIn using LDAP Identity Provider
Browse files Browse the repository at this point in the history
related to CAM-7143
  • Loading branch information
Anna Pazola committed Aug 7, 2017
1 parent fe5a99d commit 321521b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,13 @@ protected String getGroupSearchFilter(LdapGroupQuery query) {
if(query.getId() != null) {
addFilter(ldapConfiguration.getGroupIdAttribute(), query.getId(), search);
}
if(query.getIds() != null && query.getIds().length > 0) {
search.write("(|");
for (String id : query.getIds()) {
addFilter(ldapConfiguration.getGroupIdAttribute(), id, search);
}
search.write(")");
}
if(query.getName() != null) {
addFilter(ldapConfiguration.getGroupNameAttribute(), query.getName(), search);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void testFilterByGroupId() {
assertNull(group);
}

public void FAILING_testFilterByGroupIdIn() {
public void testFilterByGroupIdIn() {
List<Group> groups = identityService.createGroupQuery()
.groupIdIn("external", "management")
.list();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,7 @@ public String getUserId() {
public String getTenantId() {
return tenantId;
}

public String[] getIds() {
return ids;
}
}

0 comments on commit 321521b

Please sign in to comment.