Skip to content

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

UI: remove banner from org

adilsond6312e1b64c3
diff --git a/backend/src/server/routes/v1/integration-router.ts b/backend/src/server/routes/v1/integration-router.ts
index 41f66466bd..f7954b7a19 100644
--- a/backend/src/server/routes/v1/integration-router.ts
+++ b/backend/src/server/routes/v1/integration-router.ts
@@ -418,29 +418,4 @@ export const registerIntegrationRouter = async (server: FastifyZodProvider) => {
return { integration };
}
});
-
- server.route({
- method: "GET",
- url: "/deprecation-status",
- config: {
- rateLimit: readLimit
- },
- schema: {
- // internal: backs the deprecation banner in the UI, not part of the public API surface
- hide: true,
- response: {
- 200: z.object({
- hasNativeIntegrations: z.boolean()
- })
- }
- },
- onRequest: verifyAuth([AuthMode.JWT]),
- handler: async (req) =>
- server.services.integration.getDeprecationStatus({
- actor: req.permission.type,
- actorId: req.permission.id,
- actorAuthMethod: req.permission.authMethod,
- actorOrgId: req.permission.orgId
- })
- });
};
diff --git a/backend/src/services/integration/integration-service.ts b/backend/src/services/integration/integration-service.ts
index f9351549bc..af66dcfd57 100644
--- a/backend/src/services/integration/integration-service.ts
+++ b/backend/src/services/integration/integration-service.ts
@@ -1,7 +1,6 @@
import { ForbiddenError } from "@casl/ability";
-import { ActionProjectType, OrganizationActionScope } from "@app/db/schemas";
-import { OrgPermissionActions, OrgPermissionSubjects } from "@app/ee/services/permission/org-permission";
+import { ActionProjectType } from "@app/db/schemas";
import { throwIfMissingSecretReadValueOrDescribePermission } from "@app/ee/services/permission/permission-fns";
import { TPermissionServiceFactory } from "@app/ee/services/permission/permission-service-types";
import {
@@ -30,7 +29,6 @@ import { TIntegrationDALFactory } from "./integration-dal";
import {
TCreateIntegrationDTO,
TDeleteIntegrationDTO,
- TGetIntegrationDeprecationStatusDTO,
TGetIntegrationDTO,
TSyncIntegrationDTO,
TUpdateIntegrationDTO
@@ -41,7 +39,7 @@ type TIntegrationServiceFactoryDep = {
integrationAuthDAL: TIntegrationAuthDALFactory;
integrationAuthService: TIntegrationAuthServiceFactory;
folderDAL: Pick<TSecretFolderDALFactory, "findBySecretPath" | "findByManySecretPath">;
- permissionService: Pick<TPermissionServiceFactory, "getProjectPermission" | "getOrgPermission">;
+ permissionService: Pick<TPermissionServiceFactory, "getProjectPermission">;
projectBotService: TProjectBotServiceFactory;
secretQueueService: Pick<TSecretQueueFactory, "syncIntegrations">;
secretV2BridgeDAL: Pick<TSecretV2BridgeDALFactory, "find" | "findByFolderIds" | "findByFolderId">;
@@ -391,32 +389,6 @@ export const integrationServiceFactory = ({
return { ...integration, envId: integration.environment.id };
};
- /**
- * Backs the org-wide deprecation banner. Restricted to org admins — they are the ones who can act on it, and the
- * same audience the monthly deprecation notice emails. Only a boolean leaves the service.
- */
- const getDeprecationStatus = async ({
- actor,
- actorId,
- actorOrgId,
- actorAuthMethod
- }: TGetIntegrationDeprecationStatusDTO) => {
- const { permission } = await permissionService.getOrgPermission({
- actor,
- actorId,
- orgId: actorOrgId,
- actorAuthMethod,
- actorOrgId,
- scope: OrganizationActionScope.Any
- });
- // members hold only Read on org settings, so Edit is an effective admin gate that still honours custom roles
- ForbiddenError.from(permission).throwUnlessCan(OrgPermissionActions.Edit, OrgPermissionSubjects.Settings);
-
- const hasNativeIntegrations = await integrationDAL.hasIntegrationsByOrgId(actorOrgId);
-
- return { hasNativeIntegrations };
- };
-
return {
createIntegration,
updateIntegration,
@@ -424,7 +396,6 @@ export const integrationServiceFactory = ({
listIntegrationByProject,
getIntegration,
getIntegrationAWSIamRole,
- syncIntegration,
- getDeprecationStatus
+ syncIntegration
};
};
diff --git a/backend/src/services/integration/integration-types.ts b/backend/src/services/integration/integration-types.ts
index d79eb80af3..f662affd81 100644
--- a/backend/src/services/integration/integration-types.ts
+++ b/backend/src/services/integration/integration-types.ts
@@ -1,4 +1,4 @@
-import { TOrgPermission, TProjectPermission } from "@app/lib/types";
+import { TProjectPermission } from "@app/lib/types";
export type TCreateIntegrationDTO = {
secretPath: string;
@@ -79,5 +79,3 @@ export type TDeleteIntegrationDTO = {
export type TSyncIntegrationDTO = {
id: string;
} & Omit<TProjectPermission, "projectId">;
-
-export type TGetIntegrationDeprecationStatusDTO = Omit<TOrgPermission, "orgId">;
diff --git a/frontend/src/hooks/api/integrations/index.tsx b/frontend/src/hooks/api/integrations/index.tsx
index ff1c747693..9d43c33ad2 100644
--- a/frontend/src/hooks/api/integrations/index.tsx
+++ b/frontend/src/hooks/api/integrations/index.tsx
@@ -2,6 +2,5 @@ export {
useCreateIntegration,
useDeleteIntegration,
useGetCloudIntegrations,
- useGetIntegration,
- useGetNativeIntegrationDeprecationStatus
+ useGetIntegration
} from "./queries";
diff --git a/frontend/src/hooks/api/integrations/queries.tsx b/frontend/src/hooks/api/integrations/queries.tsx
index 77e062076c..69519a5a48 100644
--- a/frontend/src/hooks/api/integrations/queries.tsx
+++ b/frontend/src/hooks/api/integrations/queries.tsx
@@ -13,8 +13,7 @@ import {
export const integrationQueryKeys = {
getIntegrations: () => ["integrations"] as const,
- getIntegration: (id: string) => ["integration", id] as const,
- getDeprecationStatus: (orgId: string) => ["integration-deprecation-status", orgId] as const
+ getIntegration: (id: string) => ["integration", id] as const
};
const fetchIntegrations = async () => {
@@ -33,33 +32,12 @@ const fetchIntegration = async (id: string) => {
return data.integration;
};
-const fetchDeprecationStatus = async () => {
- const { data } = await apiRequest.get<{ hasNativeIntegrations: boolean }>(
- "/api/v1/integration/deprecation-status"
- );
-
- return data;
-};
-
export const useGetCloudIntegrations = () =>
useQuery({
queryKey: integrationQueryKeys.getIntegrations(),
queryFn: () => fetchIntegrations()
});
-// Whether the org still has native integrations, which are deprecated. Org admins only — the endpoint
-// rejects everyone else, so callers must gate this on the caller's role. The response is scoped to the
-// org of the caller's token, hence orgId in the query key.
-export const useGetNativeIntegrationDeprecationStatus = (
- orgId: string,
- options?: { enabled?: boolean }
-) =>
- useQuery({
- queryKey: integrationQueryKeys.getDeprecationStatus(orgId),
- queryFn: () => fetchDeprecationStatus(),
- enabled: options?.enabled ?? true
- });
-
export const useCreateIntegration = () => {
const queryClient = useQueryClient();
diff --git a/frontend/src/layouts/OrganizationLayout/OrganizationLayout.tsx b/frontend/src/layouts/OrganizationLayout/OrganizationLayout.tsx
index c4f5d2c2ab..f29a29ca86 100644
--- a/frontend/src/layouts/OrganizationLayout/OrganizationLayout.tsx
+++ b/frontend/src/layouts/OrganizationLayout/OrganizationLayout.tsx
@@ -10,7 +10,6 @@ import { useFetchServerStatus } from "@app/hooks/api";
import { AuditLogBanner } from "./components/AuditLogBanner";
import { InsecureConnectionBanner } from "./components/InsecureConnectionBanner";
-import { NativeIntegrationsBanner } from "./components/NativeIntegrationsBanner";
import { Navbar } from "./components/NavBar";
import { NetworkHealthBanner } from "./components/NetworkHealthBanner";
import { OrgSidebar } from "./components/OrgSidebar";
@@ -47,7 +46,6 @@ export const OrganizationLayout = () => {
{!isLoading && !isInsideProject && subscription.auditLogs && <AuditLogBanner />}
{!window.isSecureContext && !isInsideProject && <InsecureConnectionBanner />}
{!isLoading && !isInsideProject && <NetworkHealthBanner />}
- {!isInsideProject && <NativeIntegrationsBanner />}
<div
className={twMerge(
"flex-1 overflow-x-hidden bg-bunker-800 dark:scheme-dark",
diff --git a/frontend/src/layouts/OrganizationLayout/components/NativeIntegrationsBanner/NativeIntegrationsBanner.tsx b/frontend/src/layouts/OrganizationLayout/components/NativeIntegrationsBanner/NativeIntegrationsBanner.tsx
deleted file mode 100644
index d3998821a2..0000000000
--- a/frontend/src/layouts/OrganizationLayout/components/NativeIntegrationsBanner/NativeIntegrationsBanner.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { faArrowUpRightFromSquare, faWarning, faXmark } from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-
-import { IconButton } from "@app/components/v3";
-import { useOrganization, useOrgPermission } from "@app/context";
-import { OrgMembershipRole } from "@app/helpers/roles";
-import { useBannerDismissal } from "@app/hooks";
-import { useGetNativeIntegrationDeprecationStatus } from "@app/hooks/api";
-
-const DISMISS_STORAGE_KEY = "native-integrations-banner-dismissed-at";
-const SECRET_SYNCS_DOCS_URL = "https://infisical.com/docs/integrations/secret-syncs/overview";
-
-export const NativeIntegrationsBanner = () => {
- const { currentOrg } = useOrganization();
- const [isDismissed, dismiss] = useBannerDismissal(`${DISMISS_STORAGE_KEY}-${currentOrg.id}`);
- const { hasOrgRole } = useOrgPermission();
- const isOrgAdmin = hasOrgRole(OrgMembershipRole.Admin);
-
- const { data } = useGetNativeIntegrationDeprecationStatus(currentOrg.id, {
- enabled: isOrgAdmin
- });
-
- if (isDismissed || !data?.hasNativeIntegrations) return null;
-
- return (
- <div className="flex w-full items-center border-b border-yellow/50 bg-yellow/30 px-4 py-2 text-sm text-yellow-200">
- <FontAwesomeIcon icon={faWarning} className="mr-2.5 text-base text-yellow" />
- You have projects with native integrations. Native integrations are being deprecated, recreate
- them as Secret Syncs.
- <a
- href={SECRET_SYNCS_DOCS_URL}
- rel="noopener noreferrer"
- target="_blank"
- className="group flex items-center"
- >
- <span className="cursor-pointer pl-1 underline underline-offset-2 duration-100 group-hover:text-mineshaft-100 group-hover:decoration-mineshaft-100">
- Learn more
- </span>
- <FontAwesomeIcon
- className="mt-[0.12rem] ml-1 group-hover:text-mineshaft-100"
- icon={faArrowUpRightFromSquare}
- size="xs"
- />
- </a>
- <IconButton
- className="ml-auto shrink-0 text-yellow-200"
- aria-label="Dismiss banner"
- variant="ghost"
- size="xs"
- onClick={dismiss}
- >
- <FontAwesomeIcon icon={faXmark} />
- </IconButton>
- </div>
- );
-};
diff --git a/frontend/src/layouts/OrganizationLayout/components/NativeIntegrationsBanner/index.ts b/frontend/src/layouts/OrganizationLayout/components/NativeIntegrationsBanner/index.ts
deleted file mode 100644
index 7f0b98fe0e..0000000000
--- a/frontend/src/layouts/OrganizationLayout/components/NativeIntegrationsBanner/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from "./NativeIntegrationsBanner";