Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Merge branch 'main' of https://github.com/Infisical/infisical into feat/suborg-scope-support
Piyush Gupta2a86b73c5f0d
diff --cc frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsxindex cb0a738f81,4610546cb9..42d0e92c07--- a/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx+++ b/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx@@@ -192,11 -182,9 +191,8 @@@ export const Navbar = () =>}}, [subscription, isBillingPage, isModalIntrusive]);- const matches = useRouterState({ select: (s) => s.matches.at(-1)?.context });- const breadcrumbs = matches && "breadcrumbs" in matches ? matches.breadcrumbs : undefined;-- const handleOrgChange = async (orgId: string) => {- queryClient.removeQueries({ queryKey: authKeys.getAuthToken });- queryClient.removeQueries({ queryKey: projectKeys.getAllUserProjects() });+ const handleOrgChange = async (orgId: string, onSuccess?: () => void | Promise<void>) => {+ if (orgId === currentOrg.id) return;const { token, isMfaEnabled, mfaMethod } = await selectOrganization({organizationId: orgId@@@ -353,54 -284,52 +351,52 @@@<img alt="infisical logo" src="/images/logotransparent.png" className="h-4" /></Link></div>- <p className="pr-3 pl-1 text-lg text-mineshaft-400/70">/</p>+ <ChevronRight size={18} className="mx-3 mt-[3px] text-mineshaft-400/70" />{isServerAdminPanel ? (- <>- <Link- to="/admin"- className="group flex cursor-pointer items-center gap-2 text-sm text-white transition-all duration-100 hover:text-primary"- >- <InstanceIcon className="size-3.5 text-xs text-bunker-300" />- <div className="whitespace-nowrap">Server Console</div>- </Link>- <p className="pr-3 pl-3 text-lg text-mineshaft-400/70">/</p>- {breadcrumbs ? (- // scott: remove /admin as we show server console above- <BreadcrumbContainer breadcrumbs={breadcrumbs.slice(1) as TBreadcrumbFormat[]} />- ) : null}- </>+ <Link+ to="/admin"+ className="group flex cursor-pointer items-center gap-2 text-sm text-white transition-all duration-100 hover:text-primary"+ >+ <InstanceIcon className="size-3.5 text-xs text-bunker-300" />+ <div className="whitespace-nowrap">Server Console</div>+ </Link>) : (<>- <div className="flex min-w-12 items-center overflow-hidden">+ <div+ className={twMerge(+ "relative flex min-w-16 items-center self-end rounded-t-md border-x border-t pt-1.5 pr-2 pb-2.5 pl-3",+ !isProjectScope && !isSubOrganization+ ? "border-org/15 bg-gradient-to-b from-org/10 to-org/[0.075]"+ : "border-transparent"+ )}+ >+ {/* scott: the below is used to hide the top border from the org nav bar */}+ {!isProjectScope && !isSubOrganization && (+ <div className="absolute -bottom-px left-0 h-px w-full bg-mineshaft-900">+ <div className="h-full bg-org/[0.075]" />+ </div>+ )}<DropdownMenu modal={false} open={isOrgSelectOpen} onOpenChange={setIsOrgSelectOpen}>- <div className="group flex cursor-pointer items-center gap-2 overflow-hidden text-sm text-white transition-all duration-100 hover:text-primary">- <Badge- asChild- variant="org"- isTruncatable- // TODO(scott): either add badge size/style variant or create designated component for namespace/org nav bar- className={twMerge(- "gap-x-1.5 text-sm",- (isProjectScope || isSubOrganization) &&- "bg-transparent text-mineshaft-200 hover:!bg-transparent hover:underline [&>svg]:!text-org"- )}+ <div className="group mr-1 flex min-w-0 cursor-pointer items-center gap-2 overflow-hidden text-sm text-white transition-all duration-100">+ <button+ className="flex cursor-pointer items-center gap-x-2 truncate whitespace-nowrap"+ type="button"+ onClick={async () => {+ navigate({+ to: "/organizations/$orgId/projects",+ params: { orgId: currentOrg.id }+ });+ if (isSubOrganization) {+ await router.invalidate({ sync: true }).catch(() => null);+ }+ }}>- <button- type="button"- onClick={async () => {- handleOrgChange(rootOrg.id);- if (isSubOrganization) {- await router.invalidate({ sync: true }).catch(() => null);- }- }}- >- <OrgIcon className="size-[12px]" />- <span>{rootOrg?.name}</span>- </button>- </Badge>- <div className="mr-1 hidden rounded-sm border border-mineshaft-500 px-1 text-xs text-bunker-300 no-underline! md:inline-block">- {getPlan(subscription)}- </div>+ <OrgIcon className={twMerge("size-[14px] shrink-0 text-org")} />- <span className="truncate">{currentOrg?.name}</span>++ <span className="truncate">{rootOrg?.name}</span>+ <Badge variant="org" className="hidden lg:inline-flex">+ Organization+ </Badge>+ </button>{subscription.cardDeclined && (<Tooltipcontent={`Your payment could not be processed${subscription.cardDeclinedReason ? `: ${subscription.cardDeclinedReason}` : ""}. Please update your payment method to continue enjoying premium features.`}