Skip to content

Commit

Permalink
fix: LDAPTeamProvider return empty array if no teams on the user
Browse files Browse the repository at this point in the history
  • Loading branch information
Tethik committed Oct 4, 2023
1 parent 449cb23 commit ce75437
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugins/ldap/src/LDAPTeamProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ export class LDAPTeamProvider implements TeamProvider {
ldapUser,
this.settings.userLookup.teamAttribute
);

if (teamIds.length === 0) {
return [];
}

const escapedTeamIds = teamIds.map((team) => escapeFilterValue(team));
const teams = await this.lookup(ctx, escapedTeamIds);
return teams;
Expand Down

0 comments on commit ce75437

Please sign in to comment.