feat(users): don't hide user email if it was the search request

This commit is contained in:
kolaente 2023-04-03 19:41:20 +02:00
parent dff4e01327
commit 84933c08cc
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 6 additions and 0 deletions

View File

@ -94,7 +94,13 @@ func ListUsers(s *xorm.Session, search string, opts *ProjectUserOpts) (users []*
Where(cond).
Find(&users)
outer:
for _, u := range users {
for _, part := range strings.Split(search, ",") {
if u.Email == part {
continue outer
}
}
u.Email = ""
}
return