Skip to content

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

feat: project settings hiding

=24acb989788e
diff --git a/frontend/src/views/Settings/ProjectSettingsPage/ProjectSettingsPage.tsx b/frontend/src/views/Settings/ProjectSettingsPage/ProjectSettingsPage.tsx
index f24055278d..965966fe4a 100644
--- a/frontend/src/views/Settings/ProjectSettingsPage/ProjectSettingsPage.tsx
+++ b/frontend/src/views/Settings/ProjectSettingsPage/ProjectSettingsPage.tsx
@@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next";
import { Tab } from "@headlessui/react";
import { useWorkspace } from "@app/context";
-import { ProjectVersion } from "@app/hooks/api/workspace/types";
+import { ProjectType, ProjectVersion } from "@app/hooks/api/workspace/types";
import { EncryptionTab } from "./components/EncryptionTab";
import { ProjectGeneralTab } from "./components/ProjectGeneralTab";
@@ -18,7 +18,9 @@ export const ProjectSettingsPage = () => {
{
name: "Encryption",
key: "tab-project-encryption",
- isHidden: currentWorkspace?.version !== ProjectVersion.V3
+ isHidden:
+ currentWorkspace?.version !== ProjectVersion.V3 ||
+ currentWorkspace?.type !== ProjectType.SecretManager
},
{ name: "Workflow Integrations", key: "tab-workflow-integrations" },
{ name: "Webhooks", key: "tab-project-webhooks" }
@@ -53,11 +55,12 @@ export const ProjectSettingsPage = () => {
<Tab.Panel>
<ProjectGeneralTab />
</Tab.Panel>
- {currentWorkspace?.version === ProjectVersion.V3 && (
- <Tab.Panel>
- <EncryptionTab />
- </Tab.Panel>
- )}
+ {currentWorkspace?.version === ProjectVersion.V3 &&
+ currentWorkspace?.type === ProjectType.SecretManager && (
+ <Tab.Panel>
+ <EncryptionTab />
+ </Tab.Panel>
+ )}
<Tab.Panel>
<WorkflowIntegrationTab />
</Tab.Panel>
diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectGeneralTab/ProjectGeneralTab.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectGeneralTab/ProjectGeneralTab.tsx
index d5c7a5c233..698665e470 100644
--- a/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectGeneralTab/ProjectGeneralTab.tsx
+++ b/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectGeneralTab/ProjectGeneralTab.tsx
@@ -1,5 +1,5 @@
import { useWorkspace } from "@app/context";
-import { ProjectVersion } from "@app/hooks/api/workspace/types";
+import { ProjectType, ProjectVersion } from "@app/hooks/api/workspace/types";
import { AuditLogsRetentionSection } from "../AuditLogsRetentionSection";
import { AutoCapitalizationSection } from "../AutoCapitalizationSection";
@@ -13,17 +13,20 @@ import { SecretTagsSection } from "../SecretTagsSection";
export const ProjectGeneralTab = () => {
const { currentWorkspace } = useWorkspace();
+ const isSecretManager = currentWorkspace?.type === ProjectType.SecretManager;
return (
<div>
<ProjectOverviewChangeSection />
- <EnvironmentSection />
- <SecretTagsSection />
- <AutoCapitalizationSection />
- <PointInTimeVersionLimitSection />
+ {isSecretManager && <EnvironmentSection />}
+ {isSecretManager && <SecretTagsSection />}
+ {isSecretManager && <AutoCapitalizationSection />}
+ {isSecretManager && <PointInTimeVersionLimitSection />}
<AuditLogsRetentionSection />
- <BackfillSecretReferenceSecretion />
- {currentWorkspace?.version !== ProjectVersion.V3 && <RebuildSecretIndicesSection />}
+ {isSecretManager && <BackfillSecretReferenceSecretion />}
+ {currentWorkspace?.version !== ProjectVersion.V3 && isSecretManager && (
+ <RebuildSecretIndicesSection />
+ )}
<DeleteProjectSection />
</div>
);