fix: exclude reserved users from global search results (#7486)

* fix: exclude reserved users from global search results

Signed-off-by: Ryan Wang <i@ryanc.cc>

* Use labelSelector

Signed-off-by: Ryan Wang <i@ryanc.cc>

---------

Signed-off-by: Ryan Wang <i@ryanc.cc>
pull/7494/head v2.21.0-alpha.2
Ryan Wang 2025-05-31 22:49:03 +08:00 committed by GitHub
parent f80487b1d5
commit c6f19a233f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 18 additions and 14 deletions

View File

@ -77,7 +77,11 @@ const handleBuildSearchIndex = () => {
});
if (currentUserHasPermission(["system:users:view"])) {
coreApiClient.user.listUser().then((response) => {
coreApiClient.user
.listUser({
labelSelector: ["!halo.run/hidden-user"],
})
.then((response) => {
response.data.items.forEach((user) => {
fuse.add({
title: user.spec.displayName,