mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 04:05:40 +01:00
Switch listUsers to searchUsers for adding project member (#18022)
Fixes #18000 Signed-off-by: AllForNothing <sshijun@vmware.com> Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
parent
76757a5334
commit
d87d906c84
@ -225,7 +225,7 @@ export class AddGroupComponent implements OnInit, OnDestroy {
|
||||
group_name: '',
|
||||
};
|
||||
this.isGroupNameValid = true;
|
||||
this.groupTooltip = 'MEMBER.USERNAME_IS_REQUIRED';
|
||||
this.groupTooltip = 'MEMBER.GROUP_NAME_REQUIRED';
|
||||
this.searchedGroups = [];
|
||||
}
|
||||
isValid(): boolean {
|
||||
|
@ -17,7 +17,7 @@ describe('AddMemberComponent', () => {
|
||||
},
|
||||
};
|
||||
const mockUserService = {
|
||||
listUsers: () => {
|
||||
searchUsers: () => {
|
||||
return of([[], []]);
|
||||
},
|
||||
};
|
||||
|
@ -81,10 +81,10 @@ export class AddMemberComponent implements OnInit, OnDestroy {
|
||||
debounceTime(500),
|
||||
switchMap(name => {
|
||||
if (name) {
|
||||
return this.userService.listUsers({
|
||||
return this.userService.searchUsers({
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
q: encodeURIComponent(`username=~${name}`),
|
||||
username: name,
|
||||
});
|
||||
} else {
|
||||
return of([]);
|
||||
|
Loading…
Reference in New Issue
Block a user