Skip to content

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

chore: removed my access page

Sheen Capadngan89031b648712
diff --git a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/PamNav.tsx b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/PamNav.tsx
index 6e93364caf..120dd137c1 100644
--- a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/PamNav.tsx
+++ b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/PamNav.tsx
@@ -2,7 +2,6 @@ import {
ClipboardList,
FileText,
FolderOpen,
- KeyRound,
Radar,
Shield,
ShieldCheck,
@@ -19,20 +18,15 @@ export const PamNav = ({ onSubmenuOpen }: { onSubmenuOpen: (submenu: Submenu) =>
const { data: capabilities } = useGetPamAccessCapabilities();
const { data: accessRequestCount } = useGetPamAccessRequestCount();
const isProductAdmin = Boolean(capabilities?.isProductAdmin);
- const isResourceAdmin = Boolean(capabilities?.isResourceAdmin);
const canViewSessions = Boolean(capabilities?.canViewSessions);
const canViewAuditLogs = Boolean(capabilities?.canViewAuditLogs);
const isApprover = Boolean(accessRequestCount?.isApprover);
const pendingCount = accessRequestCount?.pendingCount ?? 0;
- const accessItems: NavItem[] = [
- { label: "My Access", icon: KeyRound, pathSuffix: "access", exactPath: true }
- ];
+ // Accounts is visible to all users - regular users see only their accessible accounts
+ const accessItems: NavItem[] = [{ label: "Accounts", icon: FolderOpen, pathSuffix: "accounts" }];
const manageItems: NavItem[] = [
- ...(isProductAdmin || isResourceAdmin
- ? [{ label: "Accounts", icon: FolderOpen, pathSuffix: "accounts" }]
- : []),
...(isProductAdmin
? [{ label: "Account Templates", icon: ClipboardList, pathSuffix: "templates" }]
: []),
diff --git a/frontend/src/pages/pam/PamAccessPage/redirect.tsx b/frontend/src/pages/pam/PamAccessPage/redirect.tsx
new file mode 100644
index 0000000000..54422287d0
--- /dev/null
+++ b/frontend/src/pages/pam/PamAccessPage/redirect.tsx
@@ -0,0 +1,13 @@
+import { createFileRoute, redirect } from "@tanstack/react-router";
+
+// Redirect legacy /pam/access route to the unified /pam/accounts page
+export const Route = createFileRoute(
+ "/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/access/"
+)({
+ beforeLoad: ({ params }) => {
+ throw redirect({
+ to: "/organizations/$orgId/pam/accounts",
+ params: { orgId: params.orgId }
+ });
+ }
+});
diff --git a/frontend/src/pages/pam/PamAccountsPage/PamAccountsPage.tsx b/frontend/src/pages/pam/PamAccountsPage/PamAccountsPage.tsx
index 738418dd29..906e9fe4e3 100644
--- a/frontend/src/pages/pam/PamAccountsPage/PamAccountsPage.tsx
+++ b/frontend/src/pages/pam/PamAccountsPage/PamAccountsPage.tsx
@@ -45,7 +45,10 @@ import {
TAccessiblePamAccount,
useDeletePamAccount,
useDeletePamFolder,
+ useGetPamAccessCapabilities,
+ useListAccessiblePamFolders,
useListPamAccountTemplates,
+ useListPamAccountTypes,
useListPamFoldersAdmin
} from "@app/hooks/api/pam";
import { ProjectType } from "@app/hooks/api/projects/types";
@@ -54,7 +57,9 @@ import { usePopUp } from "@app/hooks/usePopUp";
import { PamDocsUrls } from "../pam-docs-urls";
import { AccountPlatformIcon } from "../PamAccessPage/components/AccountPlatformIcon";
+import { FolderAccountGroup } from "../PamAccessPage/components/FolderAccountGroup";
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";
@@ -70,15 +75,29 @@ export const PamAccountsPage = () => {
const [searchInput, setSearchInput] = useState("");
const [selectedFolderId, setSelectedFolderId] = useState<string>("");
const [selectedTemplateId, setSelectedTemplateId] = useState<string>("");
+ const [selectedAccountType, setSelectedAccountType] = useState<string>("");
const [expandedFolders, setExpandedFolders] = useState<Set<string>>(new Set());
const [resultCounts, setResultCounts] = useState<Record<string, number>>({});
- const { data: folders = [], isLoading: isLoadingFolders } = useListPamFoldersAdmin();
+ // Check user capabilities to determine admin vs regular user view
+ const { data: capabilities } = useGetPamAccessCapabilities();
+ const isAdmin = Boolean(capabilities?.isProductAdmin || capabilities?.isResourceAdmin);
+
+ // Admin users see all folders; regular users see only accessible folders
+ const { data: adminFolders = [], isLoading: isLoadingAdminFolders } = useListPamFoldersAdmin();
+ const { data: userFolders = [], isLoading: isLoadingUserFolders } = useListAccessiblePamFolders();
+ const isLoadingFolders = isAdmin ? isLoadingAdminFolders : isLoadingUserFolders;
+
+ // Admin: filter by templates; Users: filter by account types
const { data: templates = [] } = useListPamAccountTemplates();
+ const { data: accountTypes = [] } = useListPamAccountTypes();
const deleteAccount = useDeletePamAccount();
const deleteFolder = useDeletePamFolder();
+ // For regular users - request access flow
+ const [requestAccount, setRequestAccount] = useState<TAccessiblePamAccount | null>(null);
+
const { popUp, handlePopUpOpen, handlePopUpClose } = usePopUp([
"createAccount",
"deleteAccount",
@@ -93,8 +112,13 @@ export const PamAccountsPage = () => {
const query = searchInput.trim();
// Active filters force-open every folder so matches surface; otherwise folders load lazily on open
- const filterActive = Boolean(query || selectedTemplateId);
- const hasActiveFilters = Boolean(query || selectedFolderId || selectedTemplateId);
+ // Admin uses template filter; regular users use account type filter
+ const filterActive = isAdmin
+ ? Boolean(query || selectedTemplateId)
+ : Boolean(query || selectedAccountType);
+ const hasActiveFilters = isAdmin
+ ? Boolean(query || selectedFolderId || selectedTemplateId)
+ : Boolean(query || selectedFolderId || selectedAccountType);
const toggleFolder = useCallback((folderId: string) => {
setExpandedFolders((prev) => {
@@ -109,17 +133,44 @@ export const PamAccountsPage = () => {
setResultCounts((prev) => (prev[folderId] === count ? prev : { ...prev, [folderId]: count }));
}, []);
- const visibleFolders = selectedFolderId
- ? folders.filter((folder) => folder.id === selectedFolderId)
- : folders;
+ // Compute visible folders separately for admin and user views (for proper typing)
+ const visibleAdminFolders = selectedFolderId
+ ? adminFolders.filter((folder) => folder.id === selectedFolderId)
+ : adminFolders;
+
+ // For regular users, only show folders that have accounts they can access
+ const nonEmptyUserFolders = userFolders.filter((folder) => folder.accountCount > 0);
+ const visibleUserFolders = selectedFolderId
+ ? nonEmptyUserFolders.filter((folder) => folder.id === selectedFolderId)
+ : nonEmptyUserFolders;
+
+ // For folder dropdown, use the appropriate list
+ const folderDropdownOptions = isAdmin ? adminFolders : nonEmptyUserFolders;
const isFolderOpen = (folderId: string) =>
filterActive || folderId === selectedFolderId || expandedFolders.has(folderId);
+ const visibleFolderCount = isAdmin ? visibleAdminFolders.length : visibleUserFolders.length;
+ const visibleFolders = isAdmin ? visibleAdminFolders : visibleUserFolders;
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);
+ const showEmpty = !isLoadingFolders && (visibleFolderCount === 0 || showNoMatches);
+
+ // Compute empty state messages to avoid nested ternaries
+ let emptyTitle: string;
+ let emptyDescription: string;
+ if (hasActiveFilters) {
+ emptyTitle = "No accounts match your filters";
+ emptyDescription = "Try adjusting your search or filters.";
+ } else if (isAdmin) {
+ emptyTitle = "No accounts yet";
+ emptyDescription =
+ "Create your first account to get started. You'll need at least one account template.";
+ } else {
+ emptyTitle = "No accounts available";
+ emptyDescription = "Ask your PAM admin to grant you access to a folder or account.";
+ }
const handleDelete = () => {
const { accountId, accountType } = popUp.deleteAccount.data as {
@@ -159,7 +210,7 @@ export const PamAccountsPage = () => {
</Helmet>
<PageHeader
title="Accounts"
- description="Onboard and configure privileged accounts."
+ description="Access and manage privileged accounts."
scope={ProjectType.PAM}
icon={FolderOpen}
/>
@@ -170,41 +221,45 @@ export const PamAccountsPage = () => {
Accounts
<DocumentationLinkBadge href={PamDocsUrls.accounts.overview} />
</CardTitle>
- <CardDescription>Onboard accounts and manage who can access them.</CardDescription>
- <CardAction>
- <ButtonGroup>
- <Button
- variant="pam"
- className="rounded-r-none"
- onClick={() => handlePopUpOpen("createAccount")}
- >
- <Plus />
- Add Account
- </Button>
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <IconButton
- variant="pam"
- aria-label="More create options"
- className="border-l-transparent"
- >
- <ChevronDown />
- </IconButton>
- </DropdownMenuTrigger>
- <DropdownMenuContent
- align="end"
- sideOffset={4}
- onClick={(e) => e.stopPropagation()}
+ <CardDescription>
+ Launch sessions for accounts you have access to, or manage account settings.
+ </CardDescription>
+ {isAdmin && (
+ <CardAction>
+ <ButtonGroup>
+ <Button
+ variant="pam"
+ className="rounded-r-none"
+ onClick={() => handlePopUpOpen("createAccount")}
>
- <DropdownMenuLabel>New</DropdownMenuLabel>
- <DropdownMenuItem onClick={() => handlePopUpOpen("createFolder")}>
- <FolderPlus />
- Add Folder
- </DropdownMenuItem>
- </DropdownMenuContent>
- </DropdownMenu>
- </ButtonGroup>
- </CardAction>
+ <Plus />
+ Add Account
+ </Button>
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <IconButton
+ variant="pam"
+ aria-label="More create options"
+ className="border-l-transparent"
+ >
+ <ChevronDown />
+ </IconButton>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent
+ align="end"
+ sideOffset={4}
+ onClick={(e) => e.stopPropagation()}
+ >
+ <DropdownMenuLabel>New</DropdownMenuLabel>
+ <DropdownMenuItem onClick={() => handlePopUpOpen("createFolder")}>
+ <FolderPlus />
+ Add Folder
+ </DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ </ButtonGroup>
+ </CardAction>
+ )}
</CardHeader>
<CardContent className="flex items-center gap-3">
<InputGroup className="flex-1">
@@ -228,7 +283,7 @@ export const PamAccountsPage = () => {
</SelectTrigger>
<SelectContent position="popper">
<SelectItem value="all">All folders</SelectItem>
- {folders.map((folder) => (
+ {folderDropdownOptions.map((folder) => (
<SelectItem key={folder.id} value={folder.id}>
{folder.name}
</SelectItem>
@@ -236,26 +291,51 @@ export const PamAccountsPage = () => {
</SelectContent>
</Select>
- <Select
- value={selectedTemplateId}
- onValueChange={(val) => setSelectedTemplateId(val === "all" ? "" : val)}
- >
- <SelectTrigger>
- {!selectedTemplateId && <Layers className="mr-1.5 size-4 text-muted" />}
- <SelectValue placeholder="All templates" />
- </SelectTrigger>
- <SelectContent position="popper">
- <SelectItem value="all">All templates</SelectItem>
- {templates.map((tpl) => (
- <SelectItem key={tpl.id} value={tpl.id}>
- <span className="flex items-center gap-1.5">
- <AccountPlatformIcon accountType={tpl.type} size={16} />
- {tpl.name}
- </span>
- </SelectItem>
- ))}
- </SelectContent>
- </Select>
+ {isAdmin ? (
+ <Select
+ value={selectedTemplateId}
+ onValueChange={(val) => setSelectedTemplateId(val === "all" ? "" : val)}
+ >
+ <SelectTrigger>
+ {!selectedTemplateId && <Layers className="mr-1.5 size-4 text-muted" />}
+ <SelectValue placeholder="All templates" />
+ </SelectTrigger>
+ <SelectContent position="popper">
+ <SelectItem value="all">All templates</SelectItem>
+ {templates.map((tpl) => (
+ <SelectItem key={tpl.id} value={tpl.id}>
+ <span className="flex items-center gap-1.5">
+ <AccountPlatformIcon accountType={tpl.type} size={16} />
+ {tpl.name}
+ </span>
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ ) : (
+ <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>
+ )}
</CardContent>
{isLoadingFolders && (
@@ -272,14 +352,8 @@ export const PamAccountsPage = () => {
<CardContent>
<Empty className="border">
<EmptyHeader>
- <EmptyTitle>
- {hasActiveFilters ? "No results match your filters" : "No accounts yet"}
- </EmptyTitle>
- <EmptyDescription>
- {hasActiveFilters
- ? "Try adjusting your search or filters."
- : "Create your first account to get started. You'll need at least one account template."}
- </EmptyDescription>
+ <EmptyTitle>{emptyTitle}</EmptyTitle>
+ <EmptyDescription>{emptyDescription}</EmptyDescription>
</EmptyHeader>
</Empty>
</CardContent>
@@ -294,101 +368,126 @@ export const PamAccountsPage = () => {
</TableRow>
</TableHeader>
<TableBody>
- {visibleFolders.map((folder) => (
- <FolderAccountRows
- key={folder.id}
- folder={folder}
- isOpen={isFolderOpen(folder.id)}
- onToggle={() => toggleFolder(folder.id)}
- search={searchInput}
- templateId={selectedTemplateId}
- filterActive={filterActive}
- onOpenAccount={(id, tab) => accountSheet.openSheet(id, tab)}
- onDeleteAccount={(target) => handlePopUpOpen("deleteAccount", target)}
- onLaunchAccount={setLaunchAccount}
- onOpenFolder={(tab) => folderSheet.openSheet(folder.id, tab)}
- onFolderAddAccount={() =>
- handlePopUpOpen("createAccount", { folderId: folder.id })
- }
- onFolderDelete={() =>
- handlePopUpOpen("deleteFolder", {
- folderId: folder.id,
- folderName: folder.name,
- accountCount: folder.accountCount
- })
- }
- onResultCount={handleResultCount}
- />
- ))}
+ {isAdmin
+ ? visibleAdminFolders.map((folder) => (
+ <FolderAccountRows
+ key={folder.id}
+ folder={folder}
+ isOpen={isFolderOpen(folder.id)}
+ onToggle={() => toggleFolder(folder.id)}
+ search={searchInput}
+ templateId={selectedTemplateId}
+ filterActive={filterActive}
+ onOpenAccount={(id, tab) => accountSheet.openSheet(id, tab)}
+ onLaunchAccount={setLaunchAccount}
+ onDeleteAccount={(accountId, accountName, accountType) =>
+ handlePopUpOpen("deleteAccount", { accountId, accountName, accountType })
+ }
+ onOpenFolder={(tab) => folderSheet.openSheet(folder.id, tab)}
+ onFolderAddAccount={() =>
+ handlePopUpOpen("createAccount", { folderId: folder.id })
+ }
+ onFolderDelete={() =>
+ handlePopUpOpen("deleteFolder", {
+ folderId: folder.id,
+ folderName: folder.name,
+ accountCount: folder.accountCount
+ })
+ }
+ onResultCount={handleResultCount}
+ />
+ ))
+ : visibleUserFolders.map((folder) => (
+ <FolderAccountGroup
+ key={folder.id}
+ folder={folder}
+ isOpen={isFolderOpen(folder.id)}
+ onToggle={() => toggleFolder(folder.id)}
+ search={searchInput}
+ accountType={selectedAccountType}
+ filterActive={filterActive}
+ onLaunch={setLaunchAccount}
+ onRequestAccess={setRequestAccount}
+ onResultCount={handleResultCount}
+ />
+ ))}
</TableBody>
</Table>
)}
</Card>
- <CreateAccountSheet
- isOpen={popUp.createAccount.isOpen}
- defaultFolderId={(popUp.createAccount.data as { folderId?: string } | undefined)?.folderId}
- onOpenChange={(open) => {
- if (!open) handlePopUpClose("createAccount");
- }}
- onCreated={(accountId) => accountSheet.openSheet(accountId)}
- />
-
- <CreateFolderModal
- isOpen={popUp.createFolder.isOpen}
- onOpenChange={(open) => {
- if (!open) handlePopUpClose("createFolder");
- }}
- />
-
- <AccountDetailSheet
- isOpen={accountSheet.isOpen}
- accountId={accountSheet.selectedId}
- onOpenChange={(open) => {
- if (!open) accountSheet.closeSheet();
- }}
- />
-
- <FolderDetailSheet
- isOpen={folderSheet.isOpen}
- folder={folders.find((f) => f.id === folderSheet.selectedId)}
- activeTab={folderSheet.tab}
- onTabChange={folderSheet.setTab}
- onOpenChange={(open) => {
- if (!open) folderSheet.closeSheet();
- }}
- />
-
- <DeleteAccountModal
- isOpen={popUp.deleteAccount.isOpen}
- accountName={
- (popUp.deleteAccount.data as { accountName: string } | undefined)?.accountName ?? ""
- }
- accountType={
- (popUp.deleteAccount.data as { accountType: PamAccountType } | undefined)?.accountType
- }
- isLoading={deleteAccount.isPending}
- onConfirm={handleDelete}
- onOpenChange={(open) => {
- if (!open) handlePopUpClose("deleteAccount");
- }}
- />
-
- <DeleteFolderModal
- isOpen={popUp.deleteFolder.isOpen}
- folderName={
- (popUp.deleteFolder.data as { folderName: string } | undefined)?.folderName ?? ""
- }
- accountCount={
- (popUp.deleteFolder.data as { accountCount: number } | undefined)?.accountCount
- }
- isLoading={deleteFolder.isPending}
- onConfirm={handleDeleteFolder}
- onOpenChange={(open) => {
- if (!open) handlePopUpClose("deleteFolder");
- }}
- />
-
+ {/* Admin-only modals and sheets */}
+ {isAdmin && (
+ <>
+ <CreateAccountSheet
+ isOpen={popUp.createAccount.isOpen}
+ defaultFolderId={
+ (popUp.createAccount.data as { folderId?: string } | undefined)?.folderId
+ }
+ onOpenChange={(open) => {
+ if (!open) handlePopUpClose("createAccount");
+ }}
+ onCreated={(accountId) => accountSheet.openSheet(accountId)}
+ />
+
+ <CreateFolderModal
+ isOpen={popUp.createFolder.isOpen}
+ onOpenChange={(open) => {
+ if (!open) handlePopUpClose("createFolder");
+ }}
+ />
+
+ <AccountDetailSheet
+ isOpen={accountSheet.isOpen}
+ accountId={accountSheet.selectedId}
+ onOpenChange={(open) => {
+ if (!open) accountSheet.closeSheet();
+ }}
+ />
+
+ <FolderDetailSheet
+ isOpen={folderSheet.isOpen}
+ folder={adminFolders.find((f) => f.id === folderSheet.selectedId)}
+ activeTab={folderSheet.tab}
+ onTabChange={folderSheet.setTab}
+ onOpenChange={(open) => {
+ if (!open) folderSheet.closeSheet();
+ }}
+ />
+
+ <DeleteAccountModal
+ isOpen={popUp.deleteAccount.isOpen}
+ accountName={
+ (popUp.deleteAccount.data as { accountName: string } | undefined)?.accountName ?? ""
+ }
+ accountType={
+ (popUp.deleteAccount.data as { accountType: PamAccountType } | undefined)?.accountType
+ }
+ isLoading={deleteAccount.isPending}
+ onConfirm={handleDelete}
+ onOpenChange={(open) => {
+ if (!open) handlePopUpClose("deleteAccount");
+ }}
+ />
+
+ <DeleteFolderModal
+ isOpen={popUp.deleteFolder.isOpen}
+ folderName={
+ (popUp.deleteFolder.data as { folderName: string } | undefined)?.folderName ?? ""
+ }
+ accountCount={
+ (popUp.deleteFolder.data as { accountCount: number } | undefined)?.accountCount
+ }
+ isLoading={deleteFolder.isPending}
+ onConfirm={handleDeleteFolder}
+ onOpenChange={(open) => {
+ if (!open) handlePopUpClose("deleteFolder");
+ }}
+ />
+ </>
+ )}
+
+ {/* Shared components */}
<LaunchSessionSheet
account={launchAccount}
isOpen={launchAccount !== null}
@@ -396,6 +495,17 @@ export const PamAccountsPage = () => {
if (!open) setLaunchAccount(null);
}}
/>
+
+ {/* User-only components */}
+ {!isAdmin && (
+ <RequestAccessSheet
+ account={requestAccount}
+ isOpen={!!requestAccount}
+ onOpenChange={(open) => {
+ if (!open) setRequestAccount(null);
+ }}
+ />
+ )}
</div>
);
};
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/AccountActionsMenu.tsx b/frontend/src/pages/pam/PamAccountsPage/components/AccountActionsMenu.tsx
index cde4a947ee..f5df57a2e6 100644
--- a/frontend/src/pages/pam/PamAccountsPage/components/AccountActionsMenu.tsx
+++ b/frontend/src/pages/pam/PamAccountsPage/components/AccountActionsMenu.tsx
@@ -1,4 +1,3 @@
-import { useState } from "react";
import { MoreHorizontal, Rocket, Trash2 } from "lucide-react";
import {
@@ -7,70 +6,117 @@ import {
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuTrigger,
- IconButton
+ IconButton,
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger
} from "@app/components/v3";
-import { PamResourcePermissionActions, usePamAccountActions } from "@app/hooks/api/pam";
+import {
+ isRotatablePamAccountType,
+ PamAccountType,
+ PamResourcePermissionActions,
+ usePamAccountActions
+} from "@app/hooks/api/pam";
import { PamSheetTab } from "@app/hooks/usePamSheetState";
-import { PAM_ACCOUNT_TABS, visiblePamTabs } from "../../components/pamResourceTabs";
+import { PAM_ACCOUNT_TABS } from "../../components/pamResourceTabs";
type Props = {
accountId: string;
+ accountType: PamAccountType;
+ isAccessible: boolean;
+ onLaunch: () => void;
onOpenTab: (tab: PamSheetTab) => void;
onDelete: () => void;
- onLaunch?: () => void;
};
-export const AccountActionsMenu = ({ accountId, onOpenTab, onDelete, onLaunch }: Props) => {
- // Defer the permission fetch until the menu is first opened to avoid a request per row
- const [hasOpened, setHasOpened] = useState(false);
- const { can, isLoading } = usePamAccountActions(accountId, hasOpened);
+export const AccountActionsMenu = ({
+ accountId,
+ accountType,
+ isAccessible,
+ onLaunch,
+ onOpenTab,
+ onDelete
+}: Props) => {
+ const { can, isLoading } = usePamAccountActions(accountId, true);
- const tabs = visiblePamTabs(PAM_ACCOUNT_TABS, can);
const canDelete = can(PamResourcePermissionActions.DeleteAccounts);
- const canLaunch = can(PamResourcePermissionActions.LaunchSessions);
- const hasAnyAction = tabs.length > 0 || canDelete || canLaunch;
+ const isRotatable = isRotatablePamAccountType(accountType);
return (
- <DropdownMenu onOpenChange={(open) => open && setHasOpened(true)}>
+ <DropdownMenu>
<DropdownMenuTrigger asChild>
<IconButton
variant="ghost"
size="xs"
aria-label="Account actions"
- className="text-muted"
+ className="text-muted hover:text-foreground"
onClick={(e) => e.stopPropagation()}
>
<MoreHorizontal className="size-4" />
</IconButton>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" onClick={(e) => e.stopPropagation()}>
- {isLoading && <DropdownMenuItem isDisabled>Checking access&hellip;</DropdownMenuItem>}
- {!isLoading && !hasAnyAction && (
- <DropdownMenuItem isDisabled>No actions available</DropdownMenuItem>
- )}
- {canLaunch && onLaunch && (
- <>
- <DropdownMenuItem onClick={onLaunch}>
- <Rocket />
- Launch Session
- </DropdownMenuItem>
- {tabs.length > 0 && <DropdownMenuSeparator />}
- </>
- )}
- {tabs.map((tab) => (
- <DropdownMenuItem key={tab.value} onClick={() => onOpenTab(tab.value)}>
- <tab.icon />
- {tab.label}
- </DropdownMenuItem>
- ))}
- {canDelete && (
+ {isLoading && <DropdownMenuItem isDisabled>Loading&hellip;</DropdownMenuItem>}
+ {!isLoading && (
<>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <div>
+ <DropdownMenuItem isDisabled={!isAccessible} onClick={onLaunch}>
+ <Rocket className="size-4" />
+ Launch Session
+ </DropdownMenuItem>
+ </div>
+ </TooltipTrigger>
+ {!isAccessible && (
+ <TooltipContent side="left">
+ You don&apos;t have access to launch this account
+ </TooltipContent>
+ )}
+ </Tooltip>
+ <DropdownMenuSeparator />
+ {PAM_ACCOUNT_TABS.filter(
+ (tab) => tab.value !== PamSheetTab.Rotation || isRotatable
+ ).map((tab) => {
+ const hasPermission = !tab.action || can(tab.action);
+ return (
+ <Tooltip key={tab.value}>
+ <TooltipTrigger asChild>
+ <div>
+ <DropdownMenuItem
+ isDisabled={!hasPermission}
+ onClick={() => onOpenTab(tab.value)}
+ >
+ <tab.icon className="size-4" />
+ {tab.label}
+ </DropdownMenuItem>
+ </div>
+ </TooltipTrigger>
+ {!hasPermission && (
+ <TooltipContent side="left">
+ You don&apos;t have permission to access {tab.label.toLowerCase()}
+ </TooltipContent>
+ )}
+ </Tooltip>
+ );
+ })}
<DropdownMenuSeparator />
- <DropdownMenuItem variant="danger" onClick={onDelete}>
- <Trash2 />
- Delete Account
- </DropdownMenuItem>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <div>
+ <DropdownMenuItem variant="danger" isDisabled={!canDelete} onClick={onDelete}>
+ <Trash2 className="size-4" />
+ Delete Account
+ </DropdownMenuItem>
+ </div>
+ </TooltipTrigger>
+ {!canDelete && (
+ <TooltipContent side="left">
+ You don&apos;t have permission to delete this account
+ </TooltipContent>
+ )}
+ </Tooltip>
</>
)}
</DropdownMenuContent>
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/FolderAccountRows.tsx b/frontend/src/pages/pam/PamAccountsPage/components/FolderAccountRows.tsx
index 9289a78677..8cdba8f384 100644
--- a/frontend/src/pages/pam/PamAccountsPage/components/FolderAccountRows.tsx
+++ b/frontend/src/pages/pam/PamAccountsPage/components/FolderAccountRows.tsx
@@ -1,8 +1,8 @@
import { useEffect, useMemo } from "react";
-import { ChevronRight, Folder, FolderOpen } from "lucide-react";
+import { ChevronRight, Folder, FolderOpen, Rocket } from "lucide-react";
import { HighlightText } from "@app/components/v2/HighlightText";
-import { Badge, TableCell, TableRow } from "@app/components/v3";
+import { Badge, IconButton, TableCell, TableRow } from "@app/components/v3";
import { Skeleton } from "@app/components/v3/generic/Skeleton";
import {
PamAccountType,
@@ -18,8 +18,6 @@ import { AccountPlatformIcon } from "../../PamAccessPage/components/AccountPlatf
import { AccountActionsMenu } from "./AccountActionsMenu";
import { FolderActionsMenu } from "./FolderActionsMenu";
-type DeleteTarget = { accountId: string; accountName: string; accountType: PamAccountType };
-
type Props = {
folder: TPamFolderWithCount;
isOpen: boolean;
@@ -28,8 +26,8 @@ type Props = {
templateId: string;
filterActive: boolean;
onOpenAccount: (accountId: string, tab?: PamSheetTab) => void;
- onDeleteAccount: (target: DeleteTarget) => void;
onLaunchAccount: (account: TAccessiblePamAccount) => void;
+ onDeleteAccount: (accountId: string, accountName: string, accountType: PamAccountType) => void;
onOpenFolder: (tab?: PamSheetTab) => void;
onFolderAddAccount: () => void;
onFolderDelete: () => void;
@@ -44,8 +42,8 @@ export const FolderAccountRows = ({
templateId,
filterActive,
onOpenAccount,
- onDeleteAccount,
onLaunchAccount,
+ onDeleteAccount,
onOpenFolder,
onFolderAddAccount,
onFolderDelete,
@@ -129,12 +127,22 @@ export const FolderAccountRows = ({
!isLoading &&
accountsToShow.map((account) => {
const accountType = account.accountType as PamAccountType;
+ const launchableAccount = {
+ id: account.id,
+ name: account.name,
+ description: account.description,
+ folderId: account.folderId,
+ folderName: account.folderName,
+ templateId: account.templateId,
+ templateName: account.templateName,
+ accountType,
+ canLaunch: account.isAccessible,
+ createdAt: account.createdAt,
+ updatedAt: account.updatedAt
+ };
+
return (
- <TableRow
- key={account.id}
- className="cursor-pointer"
- onClick={() => onOpenAccount(account.id)}
- >
+ <TableRow key={account.id}>
<TableCell>
<div className="flex items-center gap-2.5 pl-[26px]">
<AccountPlatformIcon accountType={accountType} size={20} />
@@ -146,33 +154,27 @@ export const FolderAccountRows = ({
</div>
</TableCell>
<TableCell className="w-20">
- <div className="flex items-center justify-end gap-1">
- <AccountActionsMenu
- accountId={account.id}
- onOpenTab={(tab) => onOpenAccount(account.id, tab)}
- onDelete={() =>
- onDeleteAccount({
- accountId: account.id,
- accountName: account.name,
- accountType
- })
- }
- onLaunch={() =>
- onLaunchAccount({
- id: account.id,
- name: account.name,
- description: account.description,
- folderId: account.folderId,
- folderName: account.folderName,
- templateId: account.templateId,
- templateName: account.templateName,
- accountType,
- canLaunch: true,
- createdAt: account.createdAt,
- updatedAt: account.updatedAt
- })
- }
- />
+ <div className="flex items-center justify-end">
+ <div className="flex items-center gap-0.5">
+ <IconButton
+ variant="ghost"
+ size="xs"
+ aria-label="Launch session"
+ className="text-muted hover:text-foreground"
+ isDisabled={!account.isAccessible}
+ onClick={() => onLaunchAccount(launchableAccount)}
+ >
+ <Rocket className="size-4" />
+ </IconButton>
+ <AccountActionsMenu
+ accountId={account.id}
+ accountType={accountType}
+ isAccessible={account.isAccessible}
+ onLaunch={() => onLaunchAccount(launchableAccount)}
+ onOpenTab={(tab) => onOpenAccount(account.id, tab)}
+ onDelete={() => onDeleteAccount(account.id, account.name, accountType)}
+ />
+ </div>
</div>
</TableCell>
</TableRow>
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/FolderActionsMenu.tsx b/frontend/src/pages/pam/PamAccountsPage/components/FolderActionsMenu.tsx
index adb3b8e355..b61d30838b 100644
--- a/frontend/src/pages/pam/PamAccountsPage/components/FolderActionsMenu.tsx
+++ b/frontend/src/pages/pam/PamAccountsPage/components/FolderActionsMenu.tsx
@@ -1,4 +1,3 @@
-import { useState } from "react";
import { MoreHorizontal, Plus, Trash2 } from "lucide-react";
import {
@@ -26,17 +25,21 @@ type Props = {
};
export const FolderActionsMenu = ({ folder, onOpenTab, onAddAccount, onDelete }: Props) => {
- // Defer the permission fetch until the menu is first opened to avoid a request per row
- const [hasOpened, setHasOpened] = useState(false);
- const { can, isLoading } = usePamFolderActions(folder.id, hasOpened);
+ // Eagerly fetch permissions so we can hide the menu if user has no actions
+ const { can, isLoading } = usePamFolderActions(folder.id, true);
const tabs = visiblePamTabs(PAM_FOLDER_TABS, can);
const canCreateAccounts = can(PamResourcePermissionActions.CreateAccounts);
const canDelete = can(PamResourcePermissionActions.DeleteFolder);
const hasAnyAction = tabs.length > 0 || canCreateAccounts || canDelete;
+ // Hide the menu entirely while loading or if user has no folder management permissions
+ if (isLoading || !hasAnyAction) {
+ return null;
+ }
+
return (
- <DropdownMenu onOpenChange={(open) => open && setHasOpened(true)}>
+ <DropdownMenu>
<DropdownMenuTrigger asChild>
<IconButton
variant="ghost"
@@ -49,10 +52,6 @@ export const FolderActionsMenu = ({ folder, onOpenTab, onAddAccount, onDelete }:
</IconButton>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" onClick={(e) => e.stopPropagation()}>
- {isLoading && <DropdownMenuItem isDisabled>Checking access&hellip;</DropdownMenuItem>}
- {!isLoading && !hasAnyAction && (
- <DropdownMenuItem isDisabled>No actions available</DropdownMenuItem>
- )}
{tabs.map((tab) => (
<DropdownMenuItem key={tab.value} onClick={() => onOpenTab(tab.value)}>
<tab.icon />
diff --git a/frontend/src/pages/redirects/pam-access-redirect.tsx b/frontend/src/pages/redirects/pam-access-redirect.tsx
index f81832ae5a..1a0a31ed9f 100644
--- a/frontend/src/pages/redirects/pam-access-redirect.tsx
+++ b/frontend/src/pages/redirects/pam-access-redirect.tsx
@@ -1,9 +1,10 @@
import { createFileRoute, redirect } from "@tanstack/react-router";
+// Redirect legacy /pam/access route to the unified /pam/accounts page
export const Route = createFileRoute("/_authenticate/_inject-org-details/pam/access")({
beforeLoad: ({ context }: { context: { organizationId: string } }) => {
throw redirect({
- to: "/organizations/$orgId/pam/access",
+ to: "/organizations/$orgId/pam/accounts",
params: {
orgId: context.organizationId
}
diff --git a/frontend/src/routeTree.gen.ts b/frontend/src/routeTree.gen.ts
index 83f26a58d9..7fb5547d7f 100644
--- a/frontend/src/routeTree.gen.ts
+++ b/frontend/src/routeTree.gen.ts
@@ -102,6 +102,7 @@ import { Route as projectRoleDetailsBySlugPageRoutePamImport } from './pages/pro
import { 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 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'
@@ -109,7 +110,6 @@ import { Route as organizationAppConnectionsOauthCallbackPageRouteImport } from
import { Route as organizationSecretSharingPageRouteImport } from './pages/organization/SecretSharingPage/route'
import { Route as organizationProductSettingsPageSecretsManagementRouteImport } from './pages/organization/ProductSettingsPage/SecretsManagement/route'
import { Route as organizationKmipServersPageRouteImport } from './pages/organization/KmipServersPage/route'
-import { Route as pamPamAccessPageRouteImport } from './pages/pam/PamAccessPage/route'
import { Route as projectAuditLogsPageRouteSshImport } from './pages/project/AuditLogsPage/route-ssh'
import { Route as projectAccessControlPageRouteSshImport } from './pages/project/AccessControlPage/route-ssh'
import { Route as projectAuditLogsPageRouteSecretScanningImport } from './pages/project/AuditLogsPage/route-secret-scanning'
@@ -1219,6 +1219,13 @@ const projectGroupDetailsByIDPageRoutePamRoute =
getParentRoute: () => pamLayoutRoute,
} as any)
+const pamPamAccessPageRedirectRoute = pamPamAccessPageRedirectImport.update({
+ id: '/',
+ path: '/',
+ getParentRoute: () =>
+ AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdPamPamLayoutAccessRoute,
+} as any)
+
const pamPamAccountAccessPageRouteRoute =
pamPamAccountAccessPageRouteImport.update({
id: '/organizations/$orgId/pam/accounts/$accountType/$accountId/access',
@@ -1274,13 +1281,6 @@ const organizationKmipServersPageRouteRoute =
AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdProjectsKmsKmipServersRoute,
} as any)
-const pamPamAccessPageRouteRoute = pamPamAccessPageRouteImport.update({
- id: '/',
- path: '/',
- getParentRoute: () =>
- AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdPamPamLayoutAccessRoute,
-} as any)
-
const projectAuditLogsPageRouteSshRoute =
projectAuditLogsPageRouteSshImport.update({
id: '/audit-logs',
@@ -3424,13 +3424,6 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof secretManagerRedirectsRedirectApprovalPageImport
parentRoute: typeof AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdSecretManagerProjectIdImport
}
- '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/access/': {
- id: '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/access/'
- path: '/'
- fullPath: '/organizations/$orgId/pam/access/'
- preLoaderRoute: typeof pamPamAccessPageRouteImport
- parentRoute: typeof AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdPamPamLayoutAccessImport
- }
'/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/projects/kms/kmip-servers/': {
id: '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/projects/kms/kmip-servers/'
path: '/'
@@ -3480,6 +3473,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof pamPamAccountAccessPageRouteImport
parentRoute: typeof middlewaresInjectOrgDetailsImport
}
+ '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/access/': {
+ id: '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/access/'
+ path: '/'
+ fullPath: '/organizations/$orgId/pam/access/'
+ preLoaderRoute: typeof pamPamAccessPageRedirectImport
+ parentRoute: typeof AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdPamPamLayoutAccessImport
+ }
'/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/groups/$groupId': {
id: '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/groups/$groupId'
path: '/groups/$groupId'
@@ -5861,12 +5861,12 @@ const AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdNetworkingRouteWith
)
interface AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdPamPamLayoutAccessRouteChildren {
- pamPamAccessPageRouteRoute: typeof pamPamAccessPageRouteRoute
+ pamPamAccessPageRedirectRoute: typeof pamPamAccessPageRedirectRoute
}
const AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdPamPamLayoutAccessRouteChildren: AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdPamPamLayoutAccessRouteChildren =
{
- pamPamAccessPageRouteRoute: pamPamAccessPageRouteRoute,
+ pamPamAccessPageRedirectRoute: pamPamAccessPageRedirectRoute,
}
const AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdPamPamLayoutAccessRouteWithChildren =
@@ -6321,7 +6321,6 @@ export interface FileRoutesByFullPath {
'/organizations/$orgId/projects/secret-scanning/$projectId': typeof secretScanningLayoutRouteWithChildren
'/organizations/$orgId/projects/ssh/$projectId': typeof sshLayoutRouteWithChildren
'/organizations/$orgId/secret-manager/$projectId/approval': typeof secretManagerRedirectsRedirectApprovalPageRoute
- '/organizations/$orgId/pam/access/': typeof pamPamAccessPageRouteRoute
'/organizations/$orgId/projects/kms/kmip-servers/': typeof organizationKmipServersPageRouteRoute
'/organizations/$orgId/projects/secret-management/product-settings/': typeof organizationProductSettingsPageSecretsManagementRouteRoute
'/organizations/$orgId/projects/secret-management/secret-sharing/': typeof organizationSecretSharingPageRouteRoute
@@ -6329,6 +6328,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/groups/$groupId': typeof projectGroupDetailsByIDPageRoutePamRoute
'/organizations/$orgId/pam/identities/$identityId': typeof projectIdentityDetailsByIDPageRoutePamRoute
'/organizations/$orgId/pam/members/$membershipId': typeof projectMemberDetailsByIDPageRoutePamRoute
@@ -6606,7 +6606,6 @@ export interface FileRoutesByTo {
'/organizations/$orgId/projects/secret-scanning/$projectId': typeof secretScanningLayoutRouteWithChildren
'/organizations/$orgId/projects/ssh/$projectId': typeof sshLayoutRouteWithChildren
'/organizations/$orgId/secret-manager/$projectId/approval': typeof secretManagerRedirectsRedirectApprovalPageRoute
- '/organizations/$orgId/pam/access': typeof pamPamAccessPageRouteRoute
'/organizations/$orgId/projects/kms/kmip-servers': typeof organizationKmipServersPageRouteRoute
'/organizations/$orgId/projects/secret-management/product-settings': typeof organizationProductSettingsPageSecretsManagementRouteRoute
'/organizations/$orgId/projects/secret-management/secret-sharing': typeof organizationSecretSharingPageRouteRoute
@@ -6614,6 +6613,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/groups/$groupId': typeof projectGroupDetailsByIDPageRoutePamRoute
'/organizations/$orgId/pam/identities/$identityId': typeof projectIdentityDetailsByIDPageRoutePamRoute
'/organizations/$orgId/pam/members/$membershipId': typeof projectMemberDetailsByIDPageRoutePamRoute
@@ -6895,7 +6895,6 @@ export interface FileRoutesById {
'/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/projects/secret-scanning/$projectId': typeof AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdProjectsSecretScanningProjectIdRouteWithChildren
'/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/projects/ssh/$projectId': typeof AuthenticateInjectOrgDetailsOrgLayoutOrganizationsOrgIdProjectsSshProjectIdRouteWithChildren
'/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/secret-manager/$projectId/approval': typeof secretManagerRedirectsRedirectApprovalPageRoute
- '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/access/': typeof pamPamAccessPageRouteRoute
'/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/projects/kms/kmip-servers/': typeof organizationKmipServersPageRouteRoute
'/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/projects/secret-management/product-settings/': typeof organizationProductSettingsPageSecretsManagementRouteRoute
'/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/projects/secret-management/secret-sharing/': typeof organizationSecretSharingPageRouteRoute
@@ -6903,6 +6902,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/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
@@ -7199,7 +7199,6 @@ export interface FileRouteTypes {
| '/organizations/$orgId/projects/secret-scanning/$projectId'
| '/organizations/$orgId/projects/ssh/$projectId'
| '/organizations/$orgId/secret-manager/$projectId/approval'
- | '/organizations/$orgId/pam/access/'
| '/organizations/$orgId/projects/kms/kmip-servers/'
| '/organizations/$orgId/projects/secret-management/product-settings/'
| '/organizations/$orgId/projects/secret-management/secret-sharing/'
@@ -7207,6 +7206,7 @@ export interface FileRouteTypes {
| '/organizations/$orgId/app-connections/github/manifest/callback'
| '/organizations/$orgId/projects/kms/kmip-servers/$kmipServerId'
| '/organizations/$orgId/pam/accounts/$accountType/$accountId/access'
+ | '/organizations/$orgId/pam/access/'
| '/organizations/$orgId/pam/groups/$groupId'
| '/organizations/$orgId/pam/identities/$identityId'
| '/organizations/$orgId/pam/members/$membershipId'
@@ -7483,7 +7483,6 @@ export interface FileRouteTypes {
| '/organizations/$orgId/projects/secret-scanning/$projectId'
| '/organizations/$orgId/projects/ssh/$projectId'
| '/organizations/$orgId/secret-manager/$projectId/approval'
- | '/organizations/$orgId/pam/access'
| '/organizations/$orgId/projects/kms/kmip-servers'
| '/organizations/$orgId/projects/secret-management/product-settings'
| '/organizations/$orgId/projects/secret-management/secret-sharing'
@@ -7491,6 +7490,7 @@ export interface FileRouteTypes {
| '/organizations/$orgId/app-connections/github/manifest/callback'
| '/organizations/$orgId/projects/kms/kmip-servers/$kmipServerId'
| '/organizations/$orgId/pam/accounts/$accountType/$accountId/access'
+ | '/organizations/$orgId/pam/access'
| '/organizations/$orgId/pam/groups/$groupId'
| '/organizations/$orgId/pam/identities/$identityId'
| '/organizations/$orgId/pam/members/$membershipId'
@@ -7770,7 +7770,6 @@ export interface FileRouteTypes {
| '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/projects/secret-scanning/$projectId'
| '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/projects/ssh/$projectId'
| '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/secret-manager/$projectId/approval'
- | '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/access/'
| '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/projects/kms/kmip-servers/'
| '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/projects/secret-management/product-settings/'
| '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/projects/secret-management/secret-sharing/'
@@ -7778,6 +7777,7 @@ export interface FileRouteTypes {
| '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/app-connections/github/manifest/callback'
| '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/projects/kms/kmip-servers/$kmipServerId'
| '/_authenticate/_inject-org-details/organizations/$orgId/pam/accounts/$accountType/$accountId/access'
+ | '/_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'
| '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/identities/$identityId'
| '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/members/$membershipId'
@@ -8583,10 +8583,6 @@ export const routeTree = rootRoute
"filePath": "secret-manager/redirects/redirect-approval-page.tsx",
"parent": "/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/secret-manager/$projectId"
},
- "/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/access/": {
- "filePath": "pam/PamAccessPage/route.tsx",
- "parent": "/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/access"
- },
"/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/projects/kms/kmip-servers/": {
"filePath": "organization/KmipServersPage/route.tsx",
"parent": "/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/projects/kms/kmip-servers"
@@ -8615,6 +8611,10 @@ export const routeTree = rootRoute
"filePath": "pam/PamAccountAccessPage/route.tsx",
"parent": "/_authenticate/_inject-org-details"
},
+ "/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout/access/": {
+ "filePath": "pam/PamAccessPage/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": {
"filePath": "project/GroupDetailsByIDPage/route-pam.tsx",
"parent": "/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout"
diff --git a/frontend/src/routes.ts b/frontend/src/routes.ts
index e6282b7b9b..14248a5b81 100644
--- a/frontend/src/routes.ts
+++ b/frontend/src/routes.ts
@@ -396,7 +396,7 @@ const secretScanningRoutes = route("/organizations/$orgId/projects/secret-scanni
const pamRoutes = route("/organizations/$orgId/pam", [
layout("pam-layout", "pam/layout.tsx", [
- route("/access", [index("pam/PamAccessPage/route.tsx")]),
+ route("/access", [index("pam/PamAccessPage/redirect.tsx")]),
route("/accounts", "pam/PamAccountsPage/route.tsx"),
route("/templates", "pam/PamTemplatesPage/route.tsx"),
route("/discovery", "pam/PamDiscoveryPage/route.tsx"),