diff --git a/apps/client/src/components/settings/settings-queries.tsx b/apps/client/src/components/settings/settings-queries.tsx index a37ecd8b..f4cddfaa 100644 --- a/apps/client/src/components/settings/settings-queries.tsx +++ b/apps/client/src/components/settings/settings-queries.tsx @@ -8,6 +8,7 @@ import { getGroups } from "@/features/group/services/group-service.ts"; import { QueryParams } from "@/lib/types.ts"; import { getWorkspaceMembers } from "@/features/workspace/services/workspace-service.ts"; import { getLicenseInfo } from "@/ee/licence/services/license-service.ts"; +import { getSsoProviders } from '@/ee/security/services/security-service.ts'; export const prefetchWorkspaceMembers = () => { const params = { limit: 100, page: 1, query: "" } as QueryParams; @@ -49,3 +50,10 @@ export const prefetchLicense = () => { queryFn: () => getLicenseInfo(), }); }; + +export const prefetchSsoProviders = () => { + queryClient.prefetchQuery({ + queryKey: ["sso-providers"], + queryFn: () => getSsoProviders(), + }); +}; \ No newline at end of file diff --git a/apps/client/src/components/settings/settings-sidebar.tsx b/apps/client/src/components/settings/settings-sidebar.tsx index 7c3b57dd..551758ce 100644 --- a/apps/client/src/components/settings/settings-sidebar.tsx +++ b/apps/client/src/components/settings/settings-sidebar.tsx @@ -24,6 +24,7 @@ import { prefetchGroups, prefetchLicense, prefetchSpaces, + prefetchSsoProviders, prefetchWorkspaceMembers, } from "@/components/settings/settings-queries.tsx"; @@ -165,6 +166,9 @@ export default function SettingsSidebar() { prefetchHandler = prefetchLicense; } break; + case "Security & SSO": + prefetchHandler = prefetchSsoProviders; + break; default: break; } diff --git a/apps/client/src/ee/security/pages/security.tsx b/apps/client/src/ee/security/pages/security.tsx index 5399acfb..9a85cff2 100644 --- a/apps/client/src/ee/security/pages/security.tsx +++ b/apps/client/src/ee/security/pages/security.tsx @@ -35,17 +35,15 @@ export default function Security() { Single sign-on (SSO) - - - - - {!isCloud() && hasLicenseKey ? : ""} - - {/*TODO: revisit when we add a second plan - - */} - - + {/*TODO: revisit when we add a second plan */} + {!isCloud() && hasLicenseKey ? ( + <> + + + + + + ) : null}