fix: hide the ghost user from the user list (#866)

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
```
pull/871/head^2
2023-02-20 21:14:20 +08:00 committed by GitHub
parent 7b3007ec9f
commit 56e7c2f379
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -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[],