Skip to content

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

improvement: add sidebar back to org button

Scott Wilsonbb68d41573e8
diff --git a/backend/src/ee/services/license/license-fns.ts b/backend/src/ee/services/license/license-fns.ts
index e94f89113d..6438548e93 100644
--- a/backend/src/ee/services/license/license-fns.ts
+++ b/backend/src/ee/services/license/license-fns.ts
@@ -71,7 +71,7 @@ export const getDefaultOnPremFeatures = (): TFeatureSet => ({
rbac: false,
githubOrgSync: false,
customRateLimits: false,
- subOrganization: false,
+ subOrganization: true,
customAlerts: false,
secretAccessInsights: false,
auditLogs: false,
diff --git a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/ProjectNav.tsx b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/ProjectNav.tsx
index dae67d15d2..1295536dfd 100644
--- a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/ProjectNav.tsx
+++ b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/ProjectNav.tsx
@@ -1,9 +1,9 @@
import { useEffect, useState } from "react";
import { useLocation, useNavigate } from "@tanstack/react-router";
import { AnimatePresence, motion } from "framer-motion";
-import { DoorOpen, FileKey, Shield } from "lucide-react";
+import { ChevronLeft, DoorOpen, FileKey, Shield } from "lucide-react";
-import { SidebarGroup, SidebarMenu } from "@app/components/v3";
+import { SidebarGroup, SidebarGroupLabel, SidebarMenu } from "@app/components/v3";
import { useOrganization, useProject } from "@app/context";
import { ProjectType } from "@app/hooks/api/projects/types";
@@ -48,9 +48,10 @@ const PROJECT_NAV_COMPONENT: Record<
export const ProjectNav = () => {
const { currentProject } = useProject();
- const { currentOrg } = useOrganization();
+ const { currentOrg, isSubOrganization } = useOrganization();
const { pathname } = useLocation();
const navigate = useNavigate();
+ const projectLabel = isSubOrganization ? "Sub-Organization" : "Organization";
const NavComponent = PROJECT_NAV_COMPONENT[currentProject.type];
const isOnAccessControl =
@@ -135,6 +136,23 @@ export const ProjectNav = () => {
transition={{ duration: 0.15, ease: "easeOut" }}
>
<SidebarGroup>
+ <SidebarGroupLabel asChild>
+ <button
+ className="cursor-pointer hover:bg-foreground/[0.025]"
+ type="button"
+ onClick={() =>
+ navigate({
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ to: "/organizations/$orgId/projects" as any,
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ params: { orgId: currentOrg.id } as any
+ })
+ }
+ >
+ <ChevronLeft />
+ <span>{projectLabel}</span>
+ </button>
+ </SidebarGroupLabel>
<SidebarMenu>
<NavComponent onSubmenuOpen={handleSubmenuOpen} />
</SidebarMenu>