mirror of https://github.com/halo-dev/halo
				
				
				
			fix: hide the ghost user from the user list (halo-dev/console#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/3445/head
							parent
							
								
									1b97167b29
								
							
						
					
					
						commit
						28f631fec5
					
				| 
						 | 
				
			
			@ -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[],
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue