mirror of https://github.com/halo-dev/halo
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
parent
f80487b1d5
commit
c6f19a233f
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue