diff --git a/changes/24321-exclude-custom-source-without-email b/changes/24321-exclude-custom-source-without-email new file mode 100644 index 0000000000..f0c33e9c38 --- /dev/null +++ b/changes/24321-exclude-custom-source-without-email @@ -0,0 +1,2 @@ +- Exclude any custom sourced "users" from the host details "used by" display if Fleet doesn't have + an email for them. diff --git a/frontend/interfaces/host.ts b/frontend/interfaces/host.ts index 762dc5b76e..c0a9f0cab5 100644 --- a/frontend/interfaces/host.ts +++ b/frontend/interfaces/host.ts @@ -119,7 +119,10 @@ export const mapDeviceUsersForDisplay = ( idpUser = d; break; case "custom": - customUser = d; + // exclude custom user without email + if (d.email) { + customUser = d; + } break; default: newDeviceMapping.push(getDeviceUserForDisplay(d)); diff --git a/frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx b/frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx index 8947a18cf4..8e46f71971 100644 --- a/frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx +++ b/frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx @@ -39,7 +39,6 @@ import { IQueryKeyQueriesLoadAll, ISchedulableQuery, } from "interfaces/schedulable_query"; -import { IHostScript } from "interfaces/script"; import { normalizeEmptyValues,