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: cleaned up PAM access page remnants
Sheen Capadnganfe1abd905529
diff --git a/frontend/src/pages/pam/PamAccessPage/PamAccessPage.tsx b/frontend/src/pages/pam/PamAccessPage/PamAccessPage.tsxdeleted file mode 100644index 90421794dc..0000000000--- a/frontend/src/pages/pam/PamAccessPage/PamAccessPage.tsx+++ /dev/null@@ -1,271 +0,0 @@-import { useCallback, useEffect, useState } from "react";-import { Helmet } from "react-helmet";-import { useTranslation } from "react-i18next";-import { Link } from "@tanstack/react-router";-import { ArrowRight, FolderOpen, KeyRound, Layers, Search } from "lucide-react";--import { PageHeader } from "@app/components/v2";-import {- Button,- Card,- CardContent,- CardDescription,- CardHeader,- CardTitle,- Empty,- EmptyContent,- EmptyDescription,- EmptyHeader,- EmptyTitle,- InputGroup,- InputGroupAddon,- InputGroupInput,- Select,- SelectContent,- SelectItem,- SelectTrigger,- SelectValue,- Table,- TableBody,- TableHead,- TableHeader,- TableRow-} from "@app/components/v3";-import { Skeleton } from "@app/components/v3/generic/Skeleton";-import { useOrganization } from "@app/context";-import {- TAccessiblePamAccount,- useGetPamAccessCapabilities,- useListAccessiblePamFolders,- useListPamAccountTypes-} from "@app/hooks/api/pam";-import { ProjectType } from "@app/hooks/api/projects/types";--import { FolderAccountGroup } from "./components/FolderAccountGroup";-import { LaunchSessionSheet } from "./components/LaunchSessionSheet";-import { RequestAccessSheet } from "./components/RequestAccessSheet";--export const PamAccessPage = () => {- const { t } = useTranslation();-- const [sheetAccount, setSheetAccount] = useState<TAccessiblePamAccount | null>(null);- const [requestAccount, setRequestAccount] = useState<TAccessiblePamAccount | null>(null);-- const [searchInput, setSearchInput] = useState("");- const [selectedAccountType, setSelectedAccountType] = useState<string>("");- const [selectedFolderId, setSelectedFolderId] = useState<string>("");- const [expandedFolders, setExpandedFolders] = useState<Set<string>>(new Set());- const [resultCounts, setResultCounts] = useState<Record<string, number>>({});-- const { data: folders = [], isLoading: isLoadingFolders } = useListAccessiblePamFolders();- const { data: accountTypes = [] } = useListPamAccountTypes();- const { data: capabilities } = useGetPamAccessCapabilities();- const { currentOrg } = useOrganization();-- // Anyone who can reach the Accounts page from the sidebar (product admins and- // resource admins) sees a CTA that points them there — otherwise the empty- // state on a fresh org is a dead end.- const canManageAccounts = Boolean(capabilities?.isProductAdmin || capabilities?.isResourceAdmin);-- const query = searchInput.trim();-- const filterActive = Boolean(query || selectedAccountType);- const hasActiveFilters = Boolean(query || selectedAccountType || selectedFolderId);-- useEffect(() => {- setResultCounts({});- }, [query, selectedAccountType]);-- const toggleFolder = useCallback((folderId: string) => {- setExpandedFolders((prev) => {- const next = new Set(prev);- if (next.has(folderId)) next.delete(folderId);- else next.add(folderId);- return next;- });- }, []);-- const handleResultCount = useCallback((folderId: string, count: number) => {- setResultCounts((prev) => (prev[folderId] === count ? prev : { ...prev, [folderId]: count }));- }, []);-- const nonEmptyFolders = folders.filter((folder) => folder.accountCount > 0);- const visibleFolders = selectedFolderId- ? nonEmptyFolders.filter((folder) => folder.id === selectedFolderId)- : nonEmptyFolders;-- const isFolderOpen = (folderId: string) =>- filterActive || folderId === selectedFolderId || expandedFolders.has(folderId);-- const filterSettled = visibleFolders.every((f) => resultCounts[f.id] !== undefined);- const filterHasMatches = visibleFolders.some((f) => (resultCounts[f.id] ?? 0) > 0);- const showNoMatches = filterActive && filterSettled && !filterHasMatches;- const showEmpty = !isLoadingFolders && (visibleFolders.length === 0 || showNoMatches);-- let emptyTitle: string;- let emptyDescription: string;- if (hasActiveFilters) {- emptyTitle = "No accounts match your filters";- emptyDescription = "Try adjusting your search or filters.";- } else if (canManageAccounts) {- emptyTitle = "No accounts yet";- emptyDescription =- "Onboard your first privileged account from the Accounts page to get started.";- } else {- emptyTitle = "No accounts available";- emptyDescription = "Ask your PAM admin to grant you access to a folder or account.";- }-- return (- <>- <Helmet>- <title>{t("common.head-title", { title: "My Access" })}</title>- </Helmet>- <div className="mx-auto mb-6 w-full max-w-8xl">- <PageHeader- scope={ProjectType.PAM}- icon={KeyRound}- title="My Access"- description="Launch sessions for accounts you have access to."- />-- <Card className="mt-4">- <CardHeader>- <CardTitle>My Access</CardTitle>- <CardDescription>- Accounts you can connect to. Launch a session or request approval for gated accounts.- </CardDescription>- </CardHeader>- <CardContent className="flex items-center gap-3">- <InputGroup className="flex-1">- <InputGroupAddon align="inline-start">- <Search />- </InputGroupAddon>- <InputGroupInput- placeholder="Search accounts..."- value={searchInput}- onChange={(e) => setSearchInput(e.target.value)}- />- </InputGroup>- <Select- value={selectedAccountType}- onValueChange={(val) => setSelectedAccountType(val === "all" ? "" : val)}- >- <SelectTrigger>- {!selectedAccountType && <Layers className="mr-1.5 size-4 text-muted" />}- <SelectValue placeholder="All types" />- </SelectTrigger>- <SelectContent position="popper" align="end" sideOffset={4}>- <SelectItem value="all">All types</SelectItem>- {accountTypes.map((meta) => (- <SelectItem key={meta.type} value={meta.type}>- <img- src={`/images/integrations/${meta.icon}`}- alt={meta.name}- className="mr-1.5 inline-block size-4 rounded-sm"- />- {meta.name}- </SelectItem>- ))}- </SelectContent>- </Select>- <Select- value={selectedFolderId}- onValueChange={(val) => setSelectedFolderId(val === "all" ? "" : val)}- >- <SelectTrigger>- <FolderOpen className="mr-1.5 size-4 text-muted" />- <SelectValue placeholder="All folders" />- </SelectTrigger>- <SelectContent position="popper" align="end" sideOffset={4}>- <SelectItem value="all">All folders</SelectItem>- {folders.map((folder) => (- <SelectItem key={folder.id} value={folder.id}>- {folder.name}- </SelectItem>- ))}- </SelectContent>- </Select>- </CardContent>-- {isLoadingFolders && (- <CardContent>- <div className="flex flex-col gap-3">- <Skeleton className="h-10 w-full rounded-md" />- <Skeleton className="h-10 w-full rounded-md" />- <Skeleton className="h-10 w-full rounded-md" />- </div>- </CardContent>- )}-- {showEmpty && (- <CardContent>- <Empty className="border">- <EmptyHeader>- <EmptyTitle>{emptyTitle}</EmptyTitle>- <EmptyDescription>{emptyDescription}</EmptyDescription>- </EmptyHeader>- {!hasActiveFilters && canManageAccounts && (- <EmptyContent>- <Button variant="pam" asChild>- <Link- to="/organizations/$orgId/pam/accounts"- params={{ orgId: currentOrg.id }}- >- Go to Accounts- <ArrowRight />- </Link>- </Button>- </EmptyContent>- )}- </Empty>- </CardContent>- )}-- {!isLoadingFolders && !showEmpty && (- <Table>- <TableHeader>- <TableRow>- <TableHead>Name</TableHead>- <TableHead className="w-20" />- </TableRow>- </TableHeader>- <TableBody>- {visibleFolders.map((folder) => (- <FolderAccountGroup- key={folder.id}- folder={folder}- isOpen={isFolderOpen(folder.id)}- onToggle={() => toggleFolder(folder.id)}- search={searchInput}- accountType={selectedAccountType}- filterActive={filterActive}- onLaunch={setSheetAccount}- onRequestAccess={setRequestAccount}- onResultCount={handleResultCount}- />- ))}- </TableBody>- </Table>- )}- </Card>- </div>-- <LaunchSessionSheet- account={sheetAccount}- isOpen={!!sheetAccount}- onOpenChange={(open) => {- if (!open) setSheetAccount(null);- }}- />-- <RequestAccessSheet- account={requestAccount}- isOpen={!!requestAccount}- onOpenChange={(open) => {- if (!open) setRequestAccount(null);- }}- />- </>- );-};diff --git a/frontend/src/pages/pam/PamAccessPage/components/AccountRow.tsx b/frontend/src/pages/pam/PamAccessPage/components/AccountRow.tsxdeleted file mode 100644index b1a565f800..0000000000--- a/frontend/src/pages/pam/PamAccessPage/components/AccountRow.tsx+++ /dev/null@@ -1,39 +0,0 @@-import { PamAccessStatus, PamAccountType, TAccessiblePamAccount } from "@app/hooks/api/pam";--import { PamAccountRow } from "./PamAccountRow";--type Props = {- account: TAccessiblePamAccount;- search: string;- onLaunch: (account: TAccessiblePamAccount) => void;- onRequestAccess: (account: TAccessiblePamAccount) => void;- indented?: boolean;-};--export const AccountRow = ({ account, search, onLaunch, onRequestAccess, indented }: Props) => {- const { canLaunch, requiresApproval, accessStatus, grantExpiresAt, disabledReason } = account;-- const isDisabled = !!disabledReason;- const isGranted = accessStatus === PamAccessStatus.Granted;- // Approval is a layer on top of standing access: only users who could launch the account may- // request a grant, and launching a gated account requires both the permission and the grant.- const needsApproval = Boolean(requiresApproval && !isGranted && !isDisabled && canLaunch);- const canLaunchNow = canLaunch && (!requiresApproval || isGranted);-- return (- <PamAccountRow- name={account.name}- accountType={account.accountType as PamAccountType}- search={search}- accessStatus={accessStatus ?? PamAccessStatus.None}- grantExpiresAt={grantExpiresAt ?? null}- needsApproval={needsApproval}- canLaunchNow={canLaunchNow}- isDisabled={isDisabled}- disabledReason={disabledReason ?? undefined}- onLaunch={() => onLaunch(account)}- onRequestAccess={() => onRequestAccess(account)}- indented={indented}- />- );-};diff --git a/frontend/src/pages/pam/PamAccessPage/components/FolderAccountGroup.tsx b/frontend/src/pages/pam/PamAccessPage/components/FolderAccountGroup.tsxdeleted file mode 100644index 51fb0ed40d..0000000000--- a/frontend/src/pages/pam/PamAccessPage/components/FolderAccountGroup.tsx+++ /dev/null@@ -1,143 +0,0 @@-import { useEffect, useMemo, useRef } from "react";-import { ChevronRight, Folder, FolderOpen, Loader2 } from "lucide-react";--import { TableCell, TableRow } from "@app/components/v3";-import { Skeleton } from "@app/components/v3/generic/Skeleton";-import {- TAccessiblePamAccount,- TAccessiblePamFolder,- useListAccessiblePamAccounts-} from "@app/hooks/api/pam";-import { useDebounce } from "@app/hooks/useDebounce";--import { AccountRow } from "./AccountRow";--type Props = {- folder: TAccessiblePamFolder;- isOpen: boolean;- onToggle: () => void;- search: string;- accountType: string;- filterActive: boolean;- onLaunch: (account: TAccessiblePamAccount) => void;- onRequestAccess: (account: TAccessiblePamAccount) => void;- onResultCount: (folderId: string, count: number) => void;-};--export const FolderAccountGroup = ({- folder,- isOpen,- onToggle,- search,- accountType,- filterActive,- onLaunch,- onRequestAccess,- onResultCount-}: Props) => {- // Debounced term drives the server query; one request per open folder- const [debouncedSearch] = useDebounce(search);- const q = debouncedSearch.trim().toLowerCase();- const hasQuery = q.length > 0;-- // Filter server-side so matches on later pages stay reachable- const { data, isLoading, hasNextPage, isFetchingNextPage, fetchNextPage } =- useListAccessiblePamAccounts(- {- folderId: folder.id,- ...(accountType ? { accountType } : {}),- ...(hasQuery ? { search: q } : {})- },- { enabled: isOpen }- );-- const accounts = data?.pages.flatMap((p) => p.accounts) ?? [];- const totalCount = data?.pages[0]?.totalCount ?? 0;-- // Narrow loaded rows on the raw term so non-matches hide instantly, ahead of the debounce- const accountsToShow = useMemo(() => {- const live = search.trim().toLowerCase();- if (!live) return accounts;- return accounts.filter((a) => `${a.name} ${a.description ?? ""}`.toLowerCase().includes(live));- }, [accounts, search]);-- const sentinelRef = useRef<HTMLDivElement>(null);- useEffect(() => {- const el = sentinelRef.current;- if (!el || !hasNextPage) return undefined;- const observer = new IntersectionObserver(([entry]) => {- if (entry.isIntersecting && !isFetchingNextPage) fetchNextPage();- });- observer.observe(el);- return () => observer.disconnect();- }, [hasNextPage, isFetchingNextPage, fetchNextPage]);-- useEffect(() => {- if (isOpen && !isLoading) onResultCount(folder.id, totalCount);- }, [isOpen, isLoading, totalCount, folder.id, onResultCount]);-- // While filtering, hide folders with no matching accounts- if (filterActive && isOpen && !isLoading && totalCount === 0) {- return null;- }-- let count = folder.accountCount;- if (isOpen && !isLoading) count = search.trim() ? accountsToShow.length : totalCount;-- return (- <>- <TableRow className="cursor-pointer select-none" onClick={onToggle}>- <TableCell>- <div className="flex items-center gap-2.5">- <ChevronRight- className={`size-4 shrink-0 text-muted transition-transform ${isOpen ? "rotate-90" : ""}`}- />- {isOpen ? (- <FolderOpen className="size-5 shrink-0 text-product-pam" />- ) : (- <Folder className="size-5 shrink-0 text-product-pam" />- )}- <span className="font-medium text-foreground">{folder.name}</span>- <span className="text-xs text-muted">({count})</span>- </div>- </TableCell>- <TableCell className="w-20" />- </TableRow>-- {isOpen && isLoading && folder.accountCount > 0 && (- <TableRow>- <TableCell colSpan={2}>- <div className="flex flex-col gap-2 pl-[26px]">- {Array.from({ length: folder.accountCount }).map((_, i) => (- <Skeleton key={`skeleton-${i + 1}`} className="h-8 w-full rounded-md" />- ))}- </div>- </TableCell>- </TableRow>- )}-- {isOpen &&- !isLoading &&- accountsToShow.map((account) => (- <AccountRow- key={account.id}- account={account}- search={search}- onLaunch={onLaunch}- onRequestAccess={onRequestAccess}- indented- />- ))}-- {isOpen && hasNextPage && (- <TableRow>- <TableCell colSpan={2}>- <div ref={sentinelRef} className="flex justify-center py-2">- {isFetchingNextPage && <Loader2 className="size-4 animate-spin text-muted" />}- </div>- </TableCell>- </TableRow>- )}- </>- );-};diff --git a/frontend/src/pages/pam/PamAccessPage/route.tsx b/frontend/src/pages/pam/PamAccessPage/route.tsxdeleted file mode 100644index 0b64ea9ba8..0000000000--- a/frontend/src/pages/pam/PamAccessPage/route.tsx+++ /dev/null@@ -1,26 +0,0 @@-import { createFileRoute, stripSearchParams } from "@tanstack/react-router";-import { zodValidator } from "@tanstack/zod-adapter";--import { pamSheetSearchParams } from "@app/hooks/usePamSheetState";--import { PamAccessPage } from "./PamAccessPage";--export const Route = createFileRoute(- "/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/access/"-)({- validateSearch: zodValidator(pamSheetSearchParams),- search: {- middlewares: [stripSearchParams({ accountId: undefined, tab: undefined })]- },- beforeLoad: ({ context }) => {- return {- breadcrumbs: [- ...context.breadcrumbs,- {- label: "Access"- }- ]- };- },- component: PamAccessPage-});diff --git a/frontend/src/pages/pam/PamAccountsPage/PamAccountsPage.tsx b/frontend/src/pages/pam/PamAccountsPage/PamAccountsPage.tsxindex a0fa37e7fe..f669652de3 100644--- a/frontend/src/pages/pam/PamAccountsPage/PamAccountsPage.tsx+++ b/frontend/src/pages/pam/PamAccountsPage/PamAccountsPage.tsx@@ -54,9 +54,9 @@ import { ProjectType } from "@app/hooks/api/projects/types";import { usePamSheetState } from "@app/hooks/usePamSheetState";import { usePopUp } from "@app/hooks/usePopUp";+import { LaunchSessionSheet } from "../components/LaunchSessionSheet";+import { RequestAccessSheet } from "../components/RequestAccessSheet";import { PamDocsUrls } from "../pam-docs-urls";-import { LaunchSessionSheet } from "../PamAccessPage/components/LaunchSessionSheet";-import { RequestAccessSheet } from "../PamAccessPage/components/RequestAccessSheet";import { AccountDetailSheet } from "./components/AccountDetailSheet";import { CreateAccountSheet } from "./components/CreateAccountSheet";import { CreateFolderModal } from "./components/CreateFolderModal";diff --git a/frontend/src/pages/pam/PamAccountsPage/components/AccountDetailSheet.tsx b/frontend/src/pages/pam/PamAccountsPage/components/AccountDetailSheet.tsxindex 06fd8d3e88..c258b13314 100644--- a/frontend/src/pages/pam/PamAccountsPage/components/AccountDetailSheet.tsx+++ b/frontend/src/pages/pam/PamAccountsPage/components/AccountDetailSheet.tsx@@ -75,6 +75,7 @@ import {import { useGetOrgUsers } from "@app/hooks/api/users/queries";import { PamSheetTab, usePamSheetState } from "@app/hooks/usePamSheetState";+import { AccountPlatformIcon } from "../../components/AccountPlatformIcon";import { PamMemberKind, PamMembershipScope, PamMemberSource } from "../../components/memberEnums";import {formatDetailDate,@@ -86,7 +87,6 @@ import { PAM_ACCOUNT_TABS, visiblePamTabs } from "../../components/pamResourceTaimport { RemoveMemberConfirm } from "../../components/RemoveMemberConfirm";import { SheetSaveBar } from "../../components/SheetSaveBar";import { TabWarningPing } from "../../components/TabWarningPing";-import { AccountPlatformIcon } from "../../PamAccessPage/components/AccountPlatformIcon";import { AssignAccessModal, EditMemberTarget } from "./AssignAccessModal";import { EditAccountForm } from "./EditAccountForm";import { RecordingConnectionPicker } from "./RecordingConnectionPicker";diff --git a/frontend/src/pages/pam/PamAccountsPage/components/CreateAccountSheet.tsx b/frontend/src/pages/pam/PamAccountsPage/components/CreateAccountSheet.tsxindex 6e275588ee..061413556a 100644--- a/frontend/src/pages/pam/PamAccountsPage/components/CreateAccountSheet.tsx+++ b/frontend/src/pages/pam/PamAccountsPage/components/CreateAccountSheet.tsx@@ -59,7 +59,7 @@ import {usePamAccountTypeMap} from "@app/hooks/api/pam";-import { AccountPlatformIcon } from "../../PamAccessPage/components/AccountPlatformIcon";+import { AccountPlatformIcon } from "../../components/AccountPlatformIcon";import {accountFormSchema,applyServerValidationErrors,diff --git a/frontend/src/pages/pam/PamAccountsPage/components/FolderAccountRow.tsx b/frontend/src/pages/pam/PamAccountsPage/components/FolderAccountRow.tsxindex f302a938f4..f038f80ee3 100644--- a/frontend/src/pages/pam/PamAccountsPage/components/FolderAccountRow.tsx+++ b/frontend/src/pages/pam/PamAccountsPage/components/FolderAccountRow.tsx@@ -8,7 +8,7 @@ import {} from "@app/hooks/api/pam";import { PamSheetTab } from "@app/hooks/usePamSheetState";-import { PamAccountRow } from "../../PamAccessPage/components/PamAccountRow";+import { PamAccountRow } from "../../components/PamAccountRow";import { AccountAccessibilityBadgeWithPermission } from "./AccountAccessibilityBadgeWithPermission";import { AccountActionsMenu } from "./AccountActionsMenu";diff --git a/frontend/src/pages/pam/PamAccountsPage/components/FolderApprovalsTab.tsx b/frontend/src/pages/pam/PamAccountsPage/components/FolderApprovalsTab.tsxindex 7fda2e5415..9597949de1 100644--- a/frontend/src/pages/pam/PamAccountsPage/components/FolderApprovalsTab.tsx+++ b/frontend/src/pages/pam/PamAccountsPage/components/FolderApprovalsTab.tsx@@ -55,8 +55,8 @@ import {import { TPamAccessRequest, TPamNotificationConfig } from "@app/hooks/api/pam/types";import { useGetOrgUsers } from "@app/hooks/api/users/queries";+import { AccountPlatformIcon } from "../../components/AccountPlatformIcon";import { getRequestStatusInfo, isGrantActive } from "../../components/approvalRequestStatus";-import { AccountPlatformIcon } from "../../PamAccessPage/components/AccountPlatformIcon";import { FolderNotificationsSection } from "./FolderNotificationsSection";type ApproverEntry = { type: PamApproverType; id: string };diff --git a/frontend/src/pages/pam/PamApprovalRequestsPage/PamApprovalRequestsPage.tsx b/frontend/src/pages/pam/PamApprovalRequestsPage/PamApprovalRequestsPage.tsxindex eec4ca7064..008e819ff1 100644--- a/frontend/src/pages/pam/PamApprovalRequestsPage/PamApprovalRequestsPage.tsx+++ b/frontend/src/pages/pam/PamApprovalRequestsPage/PamApprovalRequestsPage.tsx@@ -40,9 +40,9 @@ import { useListPamPendingMyApproval } from "@app/hooks/api/pam";import { TPamAccessRequest } from "@app/hooks/api/pam/types";import { ProjectType } from "@app/hooks/api/projects/types";+import { AccountPlatformIcon } from "../components/AccountPlatformIcon";import { getRequestStatusInfo } from "../components/approvalRequestStatus";import { formatDuration } from "../components/formatDuration";-import { AccountPlatformIcon } from "../PamAccessPage/components/AccountPlatformIcon";import { ApprovalRequestDetailSheet } from "./components/ApprovalRequestDetailSheet";const RequestRow = ({diff --git a/frontend/src/pages/pam/PamApprovalRequestsPage/components/ApprovalRequestDetailSheet.tsx b/frontend/src/pages/pam/PamApprovalRequestsPage/components/ApprovalRequestDetailSheet.tsxindex b89e3cba3a..6193cf691c 100644--- a/frontend/src/pages/pam/PamApprovalRequestsPage/components/ApprovalRequestDetailSheet.tsx+++ b/frontend/src/pages/pam/PamApprovalRequestsPage/components/ApprovalRequestDetailSheet.tsx@@ -24,10 +24,10 @@ import {} from "@app/hooks/api/pam";import { TPamAccessRequest } from "@app/hooks/api/pam/types";+import { AccountPlatformIcon } from "../../components/AccountPlatformIcon";import { getRequestStatusInfo, isGrantActive } from "../../components/approvalRequestStatus";import { formatDuration } from "../../components/formatDuration";import { PamDetailSheet } from "../../components/PamDetailSheet";-import { AccountPlatformIcon } from "../../PamAccessPage/components/AccountPlatformIcon";type Props = {request: TPamAccessRequest | null;diff --git a/frontend/src/pages/pam/PamTemplatesPage/PamTemplatesPage.tsx b/frontend/src/pages/pam/PamTemplatesPage/PamTemplatesPage.tsxindex dbd4022b12..8d6006ff02 100644--- a/frontend/src/pages/pam/PamTemplatesPage/PamTemplatesPage.tsx+++ b/frontend/src/pages/pam/PamTemplatesPage/PamTemplatesPage.tsx@@ -51,9 +51,9 @@ import { ProjectType } from "@app/hooks/api/projects/types";import { PamSheetTab, usePamSheetState } from "@app/hooks/usePamSheetState";import { usePopUp } from "@app/hooks/usePopUp";+import { AccountPlatformIcon } from "../components/AccountPlatformIcon";import { PAM_TEMPLATE_TABS } from "../components/pamResourceTabs";import { PamDocsUrls } from "../pam-docs-urls";-import { AccountPlatformIcon } from "../PamAccessPage/components/AccountPlatformIcon";import { CreateTemplateModal } from "./components/CreateTemplateModal";import { DeleteTemplateModal } from "./components/DeleteTemplateModal";import { TemplateDetailSheet } from "./components/TemplateDetailSheet";diff --git a/frontend/src/pages/pam/PamTemplatesPage/components/TemplateDetailSheet.tsx b/frontend/src/pages/pam/PamTemplatesPage/components/TemplateDetailSheet.tsxindex 78e37d7b32..0bfed786bc 100644--- a/frontend/src/pages/pam/PamTemplatesPage/components/TemplateDetailSheet.tsx+++ b/frontend/src/pages/pam/PamTemplatesPage/components/TemplateDetailSheet.tsx@@ -45,11 +45,11 @@ import {import { ApiErrorTypes, TApiErrors } from "@app/hooks/api/types";import { PamSheetTab, usePamSheetState } from "@app/hooks/usePamSheetState";+import { AccountPlatformIcon } from "../../components/AccountPlatformIcon";import { formatDetailDate, PamDetailSheet } from "../../components/PamDetailSheet";import { PAM_TEMPLATE_TABS } from "../../components/pamResourceTabs";import { POLICY_EDITORS } from "../../components/policyEditors";import { SheetSaveBar } from "../../components/SheetSaveBar";-import { AccountPlatformIcon } from "../../PamAccessPage/components/AccountPlatformIcon";const configSchema = z.object({name: z.string().min(1, "Name is required").max(64),diff --git a/frontend/src/pages/pam/PamAccessPage/components/AccountPlatformIcon.tsx b/frontend/src/pages/pam/components/AccountPlatformIcon.tsxsimilarity index 100%rename from frontend/src/pages/pam/PamAccessPage/components/AccountPlatformIcon.tsxrename to frontend/src/pages/pam/components/AccountPlatformIcon.tsxdiff --git a/frontend/src/pages/pam/PamAccessPage/components/LaunchSessionSheet.tsx b/frontend/src/pages/pam/components/LaunchSessionSheet.tsxsimilarity index 99%rename from frontend/src/pages/pam/PamAccessPage/components/LaunchSessionSheet.tsxrename to frontend/src/pages/pam/components/LaunchSessionSheet.tsxindex f9dc1f3654..58ad32794e 100644--- a/frontend/src/pages/pam/PamAccessPage/components/LaunchSessionSheet.tsx+++ b/frontend/src/pages/pam/components/LaunchSessionSheet.tsx@@ -27,8 +27,8 @@ import { useOrganization } from "@app/context";import { TAccessiblePamAccount } from "@app/hooks/api/pam";import { PamSheetTab } from "@app/hooks/usePamSheetState";-import { PamDetailSheet } from "../../components/PamDetailSheet";import { useAccountSheetDetails } from "./accountSheetDetails";+import { PamDetailSheet } from "./PamDetailSheet";type Props = {account: TAccessiblePamAccount | null;diff --git a/frontend/src/pages/pam/PamAccessPage/components/PamAccountRow.tsx b/frontend/src/pages/pam/components/PamAccountRow.tsxsimilarity index 100%rename from frontend/src/pages/pam/PamAccessPage/components/PamAccountRow.tsxrename to frontend/src/pages/pam/components/PamAccountRow.tsxdiff --git a/frontend/src/pages/pam/components/PamDetailSheet.tsx b/frontend/src/pages/pam/components/PamDetailSheet.tsxindex 4cac3a7e20..e7650a35de 100644--- a/frontend/src/pages/pam/components/PamDetailSheet.tsx+++ b/frontend/src/pages/pam/components/PamDetailSheet.tsx@@ -26,7 +26,7 @@ import {import { Skeleton } from "@app/components/v3/generic/Skeleton";import { PamAccountType } from "@app/hooks/api/pam";-import { AccountPlatformIcon } from "../PamAccessPage/components/AccountPlatformIcon";+import { AccountPlatformIcon } from "./AccountPlatformIcon";type MetadataField = {label: string;diff --git a/frontend/src/pages/pam/PamAccessPage/components/RequestAccessSheet.tsx b/frontend/src/pages/pam/components/RequestAccessSheet.tsxsimilarity index 99%rename from frontend/src/pages/pam/PamAccessPage/components/RequestAccessSheet.tsxrename to frontend/src/pages/pam/components/RequestAccessSheet.tsxindex d321a85d74..a928ac2696 100644--- a/frontend/src/pages/pam/PamAccessPage/components/RequestAccessSheet.tsx+++ b/frontend/src/pages/pam/components/RequestAccessSheet.tsx@@ -41,8 +41,8 @@ import {useGetPamAccountApprovers} from "@app/hooks/api/pam";-import { PamDetailSheet } from "../../components/PamDetailSheet";import { useAccountSheetDetails } from "./accountSheetDetails";+import { PamDetailSheet } from "./PamDetailSheet";// Mirrors the membership expiry picker options, capped at the default 7d policy maximum and// without "No expiry" since every approved access must be time-boxed.diff --git a/frontend/src/pages/pam/PamAccessPage/components/accountSheetDetails.tsx b/frontend/src/pages/pam/components/accountSheetDetails.tsxsimilarity index 100%rename from frontend/src/pages/pam/PamAccessPage/components/accountSheetDetails.tsxrename to frontend/src/pages/pam/components/accountSheetDetails.tsxdiff --git a/frontend/src/pages/pam/PamAccessPage/redirect.tsx b/frontend/src/pages/redirects/pam-org-access-redirect.tsxsimilarity index 100%rename from frontend/src/pages/pam/PamAccessPage/redirect.tsxrename to frontend/src/pages/redirects/pam-org-access-redirect.tsxdiff --git a/frontend/src/routeTree.gen.ts b/frontend/src/routeTree.gen.tsindex 7fb5547d7f..569f4d3144 100644--- a/frontend/src/routeTree.gen.ts+++ b/frontend/src/routeTree.gen.ts@@ -102,7 +102,7 @@ import { Route as projectRoleDetailsBySlugPageRoutePamImport } from './pages/proimport { Route as projectMemberDetailsByIDPageRoutePamImport } from './pages/project/MemberDetailsByIDPage/route-pam'import { Route as projectIdentityDetailsByIDPageRoutePamImport } from './pages/project/IdentityDetailsByIDPage/route-pam'import { Route as projectGroupDetailsByIDPageRoutePamImport } from './pages/project/GroupDetailsByIDPage/route-pam'-import { Route as pamPamAccessPageRedirectImport } from './pages/pam/PamAccessPage/redirect'+import { Route as redirectsPamOrgAccessRedirectImport } from './pages/redirects/pam-org-access-redirect'import { Route as pamPamAccountAccessPageRouteImport } from './pages/pam/PamAccountAccessPage/route'import { Route as organizationKmipServersPageKmipServerDetailsByIDPageRouteImport } from './pages/organization/KmipServersPage/KmipServerDetailsByIDPage/route'import { Route as organizationAppConnectionsGitHubManifestCallbackPageRouteImport } from './pages/organization/AppConnections/GitHubManifestCallbackPage/route'@@ -1219,12 +1219,13 @@ const projectGroupDetailsByIDPageRoutePamRoute =getParentRoute: () => pamLayoutRoute,} as any)-const pamPamAccessPageRedirectRoute = pamPamAccessPageRedirectImport.update({- id: '/',- path: '/',- getParentRoute: () =>- AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdPamPamLayoutAccessRoute,-} as any)+const redirectsPamOrgAccessRedirectRoute =+ redirectsPamOrgAccessRedirectImport.update({+ id: '/',+ path: '/',+ getParentRoute: () =>+ AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdPamPamLayoutAccessRoute,+ } as any)const pamPamAccountAccessPageRouteRoute =pamPamAccountAccessPageRouteImport.update({@@ -3477,7 +3478,7 @@ declare module '@tanstack/react-router' {id: '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/access/'path: '/'fullPath: '/organizations/$orgId/pam/access/'- preLoaderRoute: typeof pamPamAccessPageRedirectImport+ preLoaderRoute: typeof redirectsPamOrgAccessRedirectImportparentRoute: typeof AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdPamPamLayoutAccessImport}'/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/groups/$groupId': {@@ -5861,12 +5862,12 @@ const AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdNetworkingRouteWith)interface AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdPamPamLayoutAccessRouteChildren {- pamPamAccessPageRedirectRoute: typeof pamPamAccessPageRedirectRoute+ redirectsPamOrgAccessRedirectRoute: typeof redirectsPamOrgAccessRedirectRoute}const AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdPamPamLayoutAccessRouteChildren: AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdPamPamLayoutAccessRouteChildren ={- pamPamAccessPageRedirectRoute: pamPamAccessPageRedirectRoute,+ redirectsPamOrgAccessRedirectRoute: redirectsPamOrgAccessRedirectRoute,}const AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdPamPamLayoutAccessRouteWithChildren =@@ -6328,7 +6329,7 @@ export interface FileRoutesByFullPath {'/organizations/$orgId/app-connections/github/manifest/callback': typeof organizationAppConnectionsGitHubManifestCallbackPageRouteRoute'/organizations/$orgId/projects/kms/kmip-servers/$kmipServerId': typeof organizationKmipServersPageKmipServerDetailsByIDPageRouteRoute'/organizations/$orgId/pam/accounts/$accountType/$accountId/access': typeof pamPamAccountAccessPageRouteRoute- '/organizations/$orgId/pam/access/': typeof pamPamAccessPageRedirectRoute+ '/organizations/$orgId/pam/access/': typeof redirectsPamOrgAccessRedirectRoute'/organizations/$orgId/pam/groups/$groupId': typeof projectGroupDetailsByIDPageRoutePamRoute'/organizations/$orgId/pam/identities/$identityId': typeof projectIdentityDetailsByIDPageRoutePamRoute'/organizations/$orgId/pam/members/$membershipId': typeof projectMemberDetailsByIDPageRoutePamRoute@@ -6613,7 +6614,7 @@ export interface FileRoutesByTo {'/organizations/$orgId/app-connections/github/manifest/callback': typeof organizationAppConnectionsGitHubManifestCallbackPageRouteRoute'/organizations/$orgId/projects/kms/kmip-servers/$kmipServerId': typeof organizationKmipServersPageKmipServerDetailsByIDPageRouteRoute'/organizations/$orgId/pam/accounts/$accountType/$accountId/access': typeof pamPamAccountAccessPageRouteRoute- '/organizations/$orgId/pam/access': typeof pamPamAccessPageRedirectRoute+ '/organizations/$orgId/pam/access': typeof redirectsPamOrgAccessRedirectRoute'/organizations/$orgId/pam/groups/$groupId': typeof projectGroupDetailsByIDPageRoutePamRoute'/organizations/$orgId/pam/identities/$identityId': typeof projectIdentityDetailsByIDPageRoutePamRoute'/organizations/$orgId/pam/members/$membershipId': typeof projectMemberDetailsByIDPageRoutePamRoute@@ -6902,7 +6903,7 @@ export interface FileRoutesById {'/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/app-connections/github/manifest/callback': typeof organizationAppConnectionsGitHubManifestCallbackPageRouteRoute'/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/projects/kms/kmip-servers/$kmipServerId': typeof organizationKmipServersPageKmipServerDetailsByIDPageRouteRoute'/_authenticate/_inject-org-details/organizations/$orgId/pam/accounts/$accountType/$accountId/access': typeof pamPamAccountAccessPageRouteRoute- '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/access/': typeof pamPamAccessPageRedirectRoute+ '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/access/': typeof redirectsPamOrgAccessRedirectRoute'/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/groups/$groupId': typeof projectGroupDetailsByIDPageRoutePamRoute'/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/identities/$identityId': typeof projectIdentityDetailsByIDPageRoutePamRoute'/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/members/$membershipId': typeof projectMemberDetailsByIDPageRoutePamRoute@@ -8612,7 +8613,7 @@ export const routeTree = rootRoute"parent": "/_authenticate/_inject-org-details"},"/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/access/": {- "filePath": "pam/PamAccessPage/redirect.tsx",+ "filePath": "redirects/pam-org-access-redirect.tsx","parent": "/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/access"},"/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/groups/$groupId": {diff --git a/frontend/src/routes.ts b/frontend/src/routes.tsindex 14248a5b81..1d39254142 100644--- a/frontend/src/routes.ts+++ b/frontend/src/routes.ts@@ -396,7 +396,7 @@ const secretScanningRoutes = route("/organizations/$orgId/projects/secret-scanniconst pamRoutes = route("/organizations/$orgId/pam", [layout("pam-layout", "pam/layout.tsx", [- route("/access", [index("pam/PamAccessPage/redirect.tsx")]),+ route("/access", [index("redirects/pam-org-access-redirect.tsx")]),route("/accounts", "pam/PamAccountsPage/route.tsx"),route("/templates", "pam/PamTemplatesPage/route.tsx"),route("/discovery", "pam/PamDiscoveryPage/route.tsx"),