Skip to content

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

add leading / when pre-populating request access modal with just account name, and show leading slashes in access account modals

x032205b94186e7606e
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsx b/frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsx
index 544d5884fe..c16dc7a66a 100644
--- a/frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsx
+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsx
@@ -29,10 +29,10 @@ export const PamAccessAccountModal = ({
const portSuffix = port && port !== "80" && port !== "443" ? `:${port}` : "";
const siteURL = `${protocol}//${hostname}${portSuffix}`;
- let fullAccountPath = account?.name ?? "";
+ let fullAccountPath = `/${account?.name ?? ""}`;
if (accountPath) {
const path = accountPath.replace(/^\/+|\/+$/g, "");
- fullAccountPath = `${path}/${account?.name ?? ""}`;
+ fullAccountPath = `/${path}/${account?.name ?? ""}`;
}
const isDurationValid = useMemo(() => duration && ms(duration || "1s") > 0, [duration]);
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx
index a1018d49d7..4eb73e8f8e 100644
--- a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx
+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx
@@ -235,7 +235,7 @@ export const PamAccountsTable = ({ projectId }: Props) => {
const resources = resourcesData?.resources || [];
const accessAccount = async (account: TPamAccount) => {
- let fullAccountPath = account.name;
+ let fullAccountPath = `/${account.name}`;
const folderPath = account.folderId ? folderPaths[account.folderId] : undefined;
if (folderPath) {
fullAccountPath = `${folderPath}/${account.name}`;