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
misc: addressed
Sheen Capadngan2a50ad5c0752
diff --git a/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/GatewayTab.tsx b/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/GatewayTab.tsxindex 72826fba31..07233a6c12 100644--- a/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/GatewayTab.tsx+++ b/frontend/src/pages/organization/NetworkingPage/components/GatewayTab/GatewayTab.tsx@@ -93,13 +93,18 @@ export const GatewayTab = withPermission(const navigate = useNavigate();const { currentOrg } = useOrganization();const orgId = currentOrg?.id || "";- const initialSubTab = useSearch({- from: ROUTE_PATHS.Organization.NetworkingPage.id,- select: (el) => el.gatewayView- });- const [activeSubTab, setActiveSubTab] = useState<"all-gateways" | "gateway-pools">(- initialSubTab ?? "all-gateways"- );+ const activeSubTab =+ useSearch({+ from: ROUTE_PATHS.Organization.NetworkingPage.id,+ select: (el) => el.gatewayView+ }) ?? "all-gateways";+ const setActiveSubTab = (view: "all-gateways" | "gateway-pools") =>+ navigate({+ to: "/organizations/$orgId/networking",+ params: { orgId },+ search: (prev) => ({ ...prev, gatewayView: view }),+ replace: true+ });const { subscription } = useSubscription();const showPoolsTab = subscription?.gatewayPool;const [search, setSearch] = useState("");diff --git a/frontend/src/pages/organization/NetworkingPage/route.tsx b/frontend/src/pages/organization/NetworkingPage/route.tsxindex 71e07477e3..bd2edd583c 100644--- a/frontend/src/pages/organization/NetworkingPage/route.tsx+++ b/frontend/src/pages/organization/NetworkingPage/route.tsx@@ -16,7 +16,7 @@ export const Route = createFileRoute(component: NetworkingPage,validateSearch: zodValidator(NetworkingPageQueryParams),search: {- middlewares: [stripSearchParams({ selectedTab: "gateways" })]+ middlewares: [stripSearchParams({ selectedTab: "gateways", gatewayView: "all-gateways" })]},context: () => ({breadcrumbs: [diff --git a/frontend/src/pages/pam/PamAccountsPage/components/CreateAccountSheet.tsx b/frontend/src/pages/pam/PamAccountsPage/components/CreateAccountSheet.tsxindex f77be3d121..27ce18e39f 100644--- a/frontend/src/pages/pam/PamAccountsPage/components/CreateAccountSheet.tsx+++ b/frontend/src/pages/pam/PamAccountsPage/components/CreateAccountSheet.tsx@@ -175,6 +175,16 @@ export const CreateAccountSheet = ({};const templateGatewayUnsupported = (tpl: { gatewayId?: string | null; type: string }) =>unsupportedBy(tpl.gatewayId, tpl.type);+ // An account can't override its template's individual gateway, so under the org's pool requirement+ // such a template can't create accounts until the template itself moves to a pool.+ const templateUnusableReason = (tpl: { gatewayId?: string | null; type: string }) => {+ const unsupportedOn = templateGatewayUnsupported(tpl);+ if (unsupportedOn) return `Gateway '${unsupportedOn}' does not support this type`;+ if (currentOrg.requireGatewayPools && tpl.gatewayId) {+ return "Uses an individual gateway, but your organization requires a gateway pool";+ }+ return null;+ };const selectedGatewayUnsupported = selectedTemplate? unsupportedBy(gateway.gatewayId, selectedTemplate.type): null;@@ -233,7 +243,7 @@ export const CreateAccountSheet = ({selectedFolderId &&selectedTemplateId &&selectedTemplate &&- !templateGatewayUnsupported(selectedTemplate)+ !templateUnusableReason(selectedTemplate));const onSubmit = (values: TAccountFormValues) => {@@ -455,10 +465,10 @@ export const CreateAccountSheet = ({>{filteredTemplates.map((tpl) => {const typeName = accountTypeMap[tpl.type]?.name ?? tpl.type;- const unusableOn = templateGatewayUnsupported(tpl);+ const unusableReason = templateUnusableReason(tpl);let subtitle = typeName;- if (unusableOn) {- subtitle = `${typeName} • Gateway '${unusableOn}' does not support this type`;+ if (unusableReason) {+ subtitle = `${typeName} • ${unusableReason}`;} else if (tpl.description) {subtitle = `${typeName} • ${tpl.description}`;}@@ -467,7 +477,9 @@ export const CreateAccountSheet = ({key={tpl.id}htmlFor={`tpl-${tpl.id}`}variant="pam"- className={unusableOn ? "cursor-not-allowed opacity-50" : undefined}+ className={+ unusableReason ? "cursor-not-allowed opacity-50" : undefined+ }><Field orientation="horizontal" className="items-center gap-3"><AccountPlatformIcon accountType={tpl.type} size={28} />@@ -480,7 +492,7 @@ export const CreateAccountSheet = ({<RadioGroupItemid={`tpl-${tpl.id}`}value={tpl.id}- disabled={Boolean(unusableOn)}+ disabled={Boolean(unusableReason)}className="sr-only"/></Field>