Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Remove import button from application view

Carlos Monastyrski21f1f95a483c
diff --git a/frontend/src/pages/cert-manager/CertificatesPage/components/CertificatesSection.tsx b/frontend/src/pages/cert-manager/CertificatesPage/components/CertificatesSection.tsx
index 9ff74343c2..7c906bf6d0 100644
--- a/frontend/src/pages/cert-manager/CertificatesPage/components/CertificatesSection.tsx
+++ b/frontend/src/pages/cert-manager/CertificatesPage/components/CertificatesSection.tsx
@@ -131,23 +131,25 @@ export const CertificatesSection = ({
<DocumentationLinkBadge href="https://infisical.com/docs/documentation/platform/pki/certificates/overview" />
</CardTitle>
<CardDescription>View, filter, and manage all certificates.</CardDescription>
- <CardAction>
- <ProjectPermissionCan
- I={ProjectPermissionCertificateActions.Import}
- a={ProjectPermissionSub.Certificates}
- >
- {(isAllowed) => (
- <Button
- variant="outline"
- onClick={() => handlePopUpOpen("certificateImport")}
- disabled={!isAllowed}
- >
- <ArrowRightIcon className="mr-1.5 size-4" />
- Import
- </Button>
- )}
- </ProjectPermissionCan>
- </CardAction>
+ {!applicationId && (
+ <CardAction>
+ <ProjectPermissionCan
+ I={ProjectPermissionCertificateActions.Import}
+ a={ProjectPermissionSub.Certificates}
+ >
+ {(isAllowed) => (
+ <Button
+ variant="outline"
+ onClick={() => handlePopUpOpen("certificateImport")}
+ disabled={!isAllowed}
+ >
+ <ArrowRightIcon className="mr-1.5 size-4" />
+ Import
+ </Button>
+ )}
+ </ProjectPermissionCan>
+ </CardAction>
+ )}
</CardHeader>
<CardContent>
<CertificatesTable