Skip to content

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

chore(secret-scanning): remove legacy projects banner

Claude367b2ccecc23
diff --git a/frontend/src/layouts/OrganizationLayout/OrganizationLayout.tsx b/frontend/src/layouts/OrganizationLayout/OrganizationLayout.tsx
index 53161161dd..8dbbfc560a 100644
--- a/frontend/src/layouts/OrganizationLayout/OrganizationLayout.tsx
+++ b/frontend/src/layouts/OrganizationLayout/OrganizationLayout.tsx
@@ -18,7 +18,6 @@ import { ProjectType } from "@app/hooks/api/projects/types";
import { useImplicitProduct } from "@app/hooks/useImplicitProduct";
import { CertManagerInstanceBanner } from "@app/layouts/PkiManagerLayout/components/CertManagerInstanceBanner";
import { AssumePrivilegeModeBanner } from "@app/layouts/ProjectLayout/components/AssumePrivilegeModeBanner";
-import { SecretScanningInstanceBanner } from "@app/layouts/SecretScanningLayout/components/SecretScanningInstanceBanner";
import { AuditLogBanner } from "./components/AuditLogBanner";
import { InsecureConnectionBanner } from "./components/InsecureConnectionBanner";
@@ -51,15 +50,6 @@ export const OrganizationLayout = () => {
)
});
- const isSecretScanningProject = useRouterState({
- select: (state) =>
- state.matches.some(
- (match) =>
- match.routeId ===
- "/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/secret-scanning/_secret-scanning-layout"
- )
- });
-
const { popUp, handlePopUpToggle } = usePopUp(["createOrg"] as const);
const containerHeight = config.pageFrameContent ? "h-[94vh]" : "h-screen";
@@ -93,7 +83,6 @@ export const OrganizationLayout = () => {
<TrialPaymentFailedBanner />
{(isInsideProject || implicitProduct) && <AssumePrivilegeModeBanner />}
{isCertManagerOverview && <CertManagerInstanceBanner />}
- {isSecretScanningProject && <SecretScanningInstanceBanner />}
{!isLoading && !isInsideProject && !serverDetails?.redisConfigured && <RedisBanner />}
{!isLoading && !isInsideProject && !serverDetails?.emailConfigured && <SmtpBanner />}
{!isLoading && !isInsideProject && subscription.auditLogs && <AuditLogBanner />}
diff --git a/frontend/src/layouts/SecretScanningLayout/components/SecretScanningInstanceBanner.tsx b/frontend/src/layouts/SecretScanningLayout/components/SecretScanningInstanceBanner.tsx
deleted file mode 100644
index 3c3c47a61a..0000000000
--- a/frontend/src/layouts/SecretScanningLayout/components/SecretScanningInstanceBanner.tsx
+++ /dev/null
@@ -1,52 +0,0 @@
-import { faWarning } from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { Link } from "@tanstack/react-router";
-
-import { useOrganization } from "@app/context";
-import { setSecretScanningActiveProjectCookie } from "@app/helpers/secretScanningActiveProject";
-import { useImplicitProjectId } from "@app/hooks";
-import { useGetSecretScanningInstanceState } from "@app/hooks/api/secretScanningV2";
-
-export const SecretScanningInstanceBanner = () => {
- const projectId = useImplicitProjectId();
- const { currentOrg } = useOrganization();
- const { data, isPending } = useGetSecretScanningInstanceState(currentOrg.id);
-
- if (isPending || !data || !data.isMultiInstance || !data.activeProjectId) return null;
-
- const { activeProjectId } = data;
- const isViewingActive = activeProjectId === projectId;
-
- return (
- <div className="flex w-full items-start gap-x-2 border-b border-warning/50 bg-warning/30 px-4 py-2 text-sm text-warning">
- <FontAwesomeIcon icon={faWarning} className="mt-0.5 shrink-0 text-base text-warning" />
- {isViewingActive ? (
- <p>
- Secret Scanning no longer uses projects. Your organization&apos;s earlier Secret Scanning
- projects are still available.{" "}
- <Link
- to="/organizations/$orgId/settings"
- params={{ orgId: currentOrg.id }}
- search={{ selectedTab: "product-settings" }}
- className="underline underline-offset-2 hover:text-warning"
- >
- View other projects
- </Link>
- </p>
- ) : (
- <p>
- You&apos;re viewing an earlier Secret Scanning project. Secret Scanning no longer uses
- projects, but this one stays available from the organization settings.{" "}
- <Link
- to="/organizations/$orgId/secret-scanning/data-sources"
- params={{ orgId: currentOrg.id }}
- onClick={() => setSecretScanningActiveProjectCookie(currentOrg.id, activeProjectId)}
- className="underline underline-offset-2 hover:text-warning"
- >
- Go to Secret Scanning →
- </Link>
- </p>
- )}
- </div>
- );
-};