From 28f631fec5331307424981e1710c5f539b71c49e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90?= <73240868+JustinLiang522@users.noreply.github.com> Date: Mon, 20 Feb 2023 21:14:20 +0800 Subject: [PATCH] fix: hide the ghost user from the user list (halo-dev/console#866) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit What type of PR is this? /kind bug What this PR does / why we need it: 将ghost用户从用户列表隐藏。 Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/3317 ```release-note NONE ``` --- src/modules/system/users/UserList.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/system/users/UserList.vue b/src/modules/system/users/UserList.vue index e59f0e0d0..d095a7daf 100644 --- a/src/modules/system/users/UserList.vue +++ b/src/modules/system/users/UserList.vue @@ -65,6 +65,7 @@ const userStore = useUserStore(); const roleStore = useRoleStore(); const ANONYMOUSUSER_NAME = "anonymousUser"; +const DELETEDUSER_NAME = "ghost"; const handleFetchUsers = async (options?: { mute?: boolean; @@ -85,7 +86,10 @@ const handleFetchUsers = async (options?: { page: users.value.page, size: users.value.size, keyword: keyword.value, - fieldSelector: [`name!=${ANONYMOUSUSER_NAME}`], + fieldSelector: [ + `name!=${ANONYMOUSUSER_NAME}`, + `name!=${DELETEDUSER_NAME}`, + ], sort: [selectedSortItem.value?.value].filter( (item) => !!item ) as string[],