mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 03:17:33 +00:00
fix(console): filter already selected user in authorization (#6168)
* fix: filter already selected user in authorization * fix: change const name --------- Co-authored-by: Max Peintner <max@caos.ch>
This commit is contained in:
@@ -106,7 +106,10 @@ export class SearchUserAutocompleteComponent implements OnInit, AfterContentChec
|
|||||||
.subscribe((userresp: ListUsersResponse.AsObject | unknown) => {
|
.subscribe((userresp: ListUsersResponse.AsObject | unknown) => {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
if (this.target === UserTarget.SELF && userresp) {
|
if (this.target === UserTarget.SELF && userresp) {
|
||||||
this.filteredUsers = (userresp as ListUsersResponse.AsObject).resultList;
|
const results = (userresp as ListUsersResponse.AsObject).resultList;
|
||||||
|
this.filteredUsers = results.filter((filteredUser) => {
|
||||||
|
return !this.users.map((u) => u.id).includes(filteredUser.id);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user