From 7e9ee7b5e3513bd7cc43d6549dcb024802b1834c Mon Sep 17 00:00:00 2001 From: Scott Wilson Date: Thu, 15 May 2025 20:01:08 -0700 Subject: [PATCH] fix: add empty display for sso general tab if no sso is enabled --- .../SecretSyncOptionsFields.tsx | 1 + .../components/OrgSsoTab/OrgSsoTab.tsx | 190 +++++++++--------- 2 files changed, 99 insertions(+), 92 deletions(-) diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncOptionsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncOptionsFields.tsx index a497c3ba9..e51de48ca 100644 --- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncOptionsFields.tsx +++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncOptionsFields.tsx @@ -144,6 +144,7 @@ export const SecretSyncOptionsFields = ({ hideInitialSync }: Props) => { Key Schema {" "} diff --git a/frontend/src/pages/organization/SsoPage/components/OrgSsoTab/OrgSsoTab.tsx b/frontend/src/pages/organization/SsoPage/components/OrgSsoTab/OrgSsoTab.tsx index 65f97cc2d..ca27b7517 100644 --- a/frontend/src/pages/organization/SsoPage/components/OrgSsoTab/OrgSsoTab.tsx +++ b/frontend/src/pages/organization/SsoPage/components/OrgSsoTab/OrgSsoTab.tsx @@ -1,7 +1,7 @@ import { twMerge } from "tailwind-merge"; import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal"; -import { Button, ContentLoader } from "@app/components/v2"; +import { Button, ContentLoader, EmptyState } from "@app/components/v2"; import { OrgPermissionActions, OrgPermissionSubjects, @@ -60,102 +60,108 @@ export const OrgSsoTab = withPermission( const shouldShowCreateIdentityProviderView = !isOidcConfigured && !isSamlConfigured && !isLdapConfigured; - const createIdentityProviderView = (shouldDisplaySection(LoginMethod.SAML) || + const createIdentityProviderView = + shouldDisplaySection(LoginMethod.SAML) || shouldDisplaySection(LoginMethod.OIDC) || - shouldDisplaySection(LoginMethod.LDAP)) && ( - <> -
-

Connect an Identity Provider

-

- Connect your identity provider to simplify user management -

- {shouldDisplaySection(LoginMethod.SAML) && ( -
-

SAML

- -
- )} - {shouldDisplaySection(LoginMethod.OIDC) && ( -
-

OIDC

- +
+ )} + {shouldDisplaySection(LoginMethod.OIDC) && ( +
- Connect - -
- )} - {shouldDisplaySection(LoginMethod.LDAP) && ( -
-

LDAP

- -
- )} -
- - - - - ); + handlePopUpOpen("addOIDC"); + }} + > + Connect + + + )} + {shouldDisplaySection(LoginMethod.LDAP) && ( +
+

LDAP

+ +
+ )} + + + + + + ) : ( + +

Single Sign-On (SSO) has been disabled

+

Contact your server administrator

+
+ ); if (areConfigsLoading) { return ;