diff --git a/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/CertificateAuthorities.tsx b/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/CertificateAuthorities.tsx
index 09597adb81..14024a8bac 100644
--- a/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/CertificateAuthorities.tsx
+++ b/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/CertificateAuthorities.tsx
@@ -147,12 +147,14 @@ const CertificateAuthorities = () => {
onExit={onAddedNewCertAuthority}
/>
)}
- {showEditCertAuthorityModal && selectedCertAuthority && (
-
- )}
+ {showEditCertAuthorityModal &&
+ selectedCertAuthority &&
+ certAuthorities && (
+
+ )}
{showDeleteCertAuthorityModal && selectedCertAuthority && (
;
export const generateFormValidations = (
- customSCEPIntegrations: ICertificateAuthorityPartial[],
+ certAuthorities: ICertificateAuthorityPartial[],
isEditing: boolean
) => {
const FORM_VALIDATIONS: IFormValidations = {
@@ -54,8 +54,10 @@ export const generateFormValidations = (
isValid: (formData: ICustomSCEPFormData) => {
return (
isEditing ||
- customSCEPIntegrations.find(
- (cert) => cert.name === formData.name
+ certAuthorities.find(
+ (cert) =>
+ cert.type === "custom_scep_proxy" &&
+ cert.name === formData.name
) === undefined
);
},
diff --git a/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/DigicertForm/helpers.ts b/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/DigicertForm/helpers.ts
index 7fc9971aa0..0683288887 100644
--- a/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/DigicertForm/helpers.ts
+++ b/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/DigicertForm/helpers.ts
@@ -57,8 +57,10 @@ export const generateFormValidations = (
isValid: (formData: IDigicertFormData) => {
return (
isEditing ||
- certAuthorities.find((cert) => cert.name === formData.name) ===
- undefined
+ certAuthorities.find(
+ (cert) =>
+ cert.type === "digicert" && cert.name === formData.name
+ ) === undefined
);
},
message: "Name is already used by another DigiCert CA.",
diff --git a/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/HydrantForm/helpers.ts b/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/HydrantForm/helpers.ts
index c655fa62e8..e262f5cc01 100644
--- a/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/HydrantForm/helpers.ts
+++ b/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/HydrantForm/helpers.ts
@@ -59,8 +59,9 @@ export const generateFormValidations = (
isValid: (formData: IHydrantFormData) => {
return (
isEditing ||
- certAuthorities.find((cert) => cert.name === formData.name) ===
- undefined
+ certAuthorities.find(
+ (cert) => cert.type === "hydrant" && cert.name === formData.name
+ ) === undefined
);
},
message: "Name is already used by another Hydrant CA.",
diff --git a/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/NDESForm/NDESForm.tsx b/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/NDESForm/NDESForm.tsx
index c22e3eac79..e988dab9ca 100644
--- a/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/NDESForm/NDESForm.tsx
+++ b/frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/NDESForm/NDESForm.tsx
@@ -31,7 +31,6 @@ const NDESForm = ({
formData,
submitBtnText,
isSubmitting,
- isEditing = false,
isDirty = true,
onChange,
onSubmit,