mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 17:27:16 +00:00
Merge pull request #3458 from Infisical/fix/SamlRemovalCornerCase
Allow user to remove SAML config
This commit is contained in:
@@ -45,6 +45,7 @@ export const OrgAuthTab = withPermission(
|
|||||||
const { data: samlConfig, isPending: isLoadingSamlConfig } = useGetSSOConfig(
|
const { data: samlConfig, isPending: isLoadingSamlConfig } = useGetSSOConfig(
|
||||||
currentOrg?.id ?? ""
|
currentOrg?.id ?? ""
|
||||||
);
|
);
|
||||||
|
|
||||||
const { data: ldapConfig, isPending: isLoadingLdapConfig } = useGetLDAPConfig(
|
const { data: ldapConfig, isPending: isLoadingLdapConfig } = useGetLDAPConfig(
|
||||||
currentOrg?.id ?? ""
|
currentOrg?.id ?? ""
|
||||||
);
|
);
|
||||||
@@ -54,7 +55,8 @@ export const OrgAuthTab = withPermission(
|
|||||||
!enabledLoginMethods || enabledLoginMethods.includes(method);
|
!enabledLoginMethods || enabledLoginMethods.includes(method);
|
||||||
|
|
||||||
const isOidcConfigured = oidcConfig && (oidcConfig.discoveryURL || oidcConfig.issuer);
|
const isOidcConfigured = oidcConfig && (oidcConfig.discoveryURL || oidcConfig.issuer);
|
||||||
const isSamlConfigured = samlConfig && samlConfig.entryPoint;
|
const isSamlConfigured =
|
||||||
|
samlConfig && (samlConfig.entryPoint || samlConfig.issuer || samlConfig.cert);
|
||||||
const isLdapConfigured = ldapConfig && ldapConfig.url;
|
const isLdapConfigured = ldapConfig && ldapConfig.url;
|
||||||
|
|
||||||
const shouldShowCreateIdentityProviderView =
|
const shouldShowCreateIdentityProviderView =
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ const ssoAuthProviders = [
|
|||||||
const schema = z
|
const schema = z
|
||||||
.object({
|
.object({
|
||||||
authProvider: z.string().min(1, "SSO Type is required"),
|
authProvider: z.string().min(1, "SSO Type is required"),
|
||||||
entryPoint: z.string().default(""),
|
entryPoint: z.string().min(1, "Entry Point is required").default(""),
|
||||||
issuer: z.string().default(""),
|
issuer: z.string().default(""),
|
||||||
cert: z.string().default("")
|
cert: z.string().default("")
|
||||||
})
|
})
|
||||||
@@ -301,6 +301,7 @@ export const SSOModal = ({ popUp, handlePopUpClose, handlePopUpToggle, hideDelet
|
|||||||
label={renderLabels(authProvider).entryPoint}
|
label={renderLabels(authProvider).entryPoint}
|
||||||
errorText={error?.message}
|
errorText={error?.message}
|
||||||
isError={Boolean(error)}
|
isError={Boolean(error)}
|
||||||
|
isRequired
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
{...field}
|
{...field}
|
||||||
|
|||||||
Reference in New Issue
Block a user