Skip to content

Commit

Permalink
fix(rbac): ensure we are returning distinct roles from database
Browse files Browse the repository at this point in the history
  • Loading branch information
PatAKnight committed Jun 3, 2024
1 parent d4d98dd commit e64586f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/rbac-backend/src/role-manager/member-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ export class RoleMemberList {
const roles: string[] = await client
.table('casbin_rule')
.whereIn('v0', userAndGroups)
.pluck('v1');
.pluck('v1')
.distinct();

roleMemberList.addRoles(roles);
} catch (error) {
Expand Down

0 comments on commit e64586f

Please sign in to comment.