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
fix: addressing code review concerns
IgorHorta356254ff2836
diff --git a/docs/internals/permissions/project-permissions.mdx b/docs/internals/permissions/project-permissions.mdxindex 2aa041979e..6033e0c7b8 100644--- a/docs/internals/permissions/project-permissions.mdx+++ b/docs/internals/permissions/project-permissions.mdx@@ -217,8 +217,6 @@ Supports conditions and permission inversion#### Subject: `secret-approval-request`-Secret Manager projects only. Not available in the role editor for other project types.-| Action | Description || ------ | --------------------------------------------------------------------------- || `read` | List and view all secret approval requests in the project |diff --git a/frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/components/SecretApprovalRequestChangeItem.tsx b/frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/components/SecretApprovalRequestChangeItem.tsxindex 0c44c8bb84..f2958f843f 100644--- a/frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/components/SecretApprovalRequestChangeItem.tsx+++ b/frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/components/SecretApprovalRequestChangeItem.tsx@@ -18,7 +18,6 @@ import { twMerge } from "tailwind-merge";import { SecretInput, Tag, Tooltip } from "@app/components/v2";import { CommitType, SecretV3Raw, TSecretApprovalSecChange, WsTag } from "@app/hooks/api/types";-import { HIDDEN_SECRET_VALUE } from "@app/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretItem";// Scrolls a container to center the first changed element if it's not visibleconst scrollToFirstChange = (container: HTMLDivElement | null) => {@@ -395,35 +394,24 @@ const renderOldSecretValue = ({}if (hasValueChanges) {- const diffContent = isBothSingleLine ? (- renderSingleLineDiffForApproval(oldValue, newValue, true)- ) : (- <div className="min-w-max">{renderMultilineDiffForApproval(oldValue, newValue, true)}</div>- );- return (- <div className="relative">+ if (isBothSingleLine) {+ return (<div- ref={oldDiffContainerRef}- className={twMerge(- "rounded-lg border border-mineshaft-600 p-2",- !isBothSingleLine && "max-h-96 thin-scrollbar overflow-x-auto overflow-y-auto"- )}+ className="relative rounded-lg border border-mineshaft-600 p-2"style={{ backgroundColor: "#120808" }}>- {isVisible ? (- diffContent- ) : (- <div className="ph-no-capture font-mono text-sm text-bunker-300">- {HIDDEN_SECRET_VALUE}- </div>- )}- </div>- <div className="absolute top-1 right-1 z-10" onClick={onToggleVisibility}>- <FontAwesomeIcon- icon={isVisible ? faEyeSlash : faEye}- className="cursor-pointer rounded-md border border-mineshaft-500 bg-mineshaft-800 p-1.5 text-mineshaft-300 hover:bg-mineshaft-700"- />+ {renderSingleLineDiffForApproval(oldValue, newValue, true)}</div>+ );+ }++ return (+ <div+ ref={oldDiffContainerRef}+ className="relative max-h-96 thin-scrollbar overflow-x-auto overflow-y-auto rounded-lg border border-mineshaft-600 p-2"+ style={{ backgroundColor: "#120808" }}+ >+ <div className="min-w-max">{renderMultilineDiffForApproval(oldValue, newValue, true)}</div></div>);}@@ -502,35 +490,24 @@ const renderNewSecretValue = ({}if (hasValueChanges) {- const diffContent = isBothSingleLine ? (- renderSingleLineDiffForApproval(oldValue, newValue, false)- ) : (- <div className="min-w-max">{renderMultilineDiffForApproval(oldValue, newValue, false)}</div>- );- return (- <div className="relative">+ if (isBothSingleLine) {+ return (<div- ref={newDiffContainerRef}- className={twMerge(- "rounded-lg border border-mineshaft-600 p-2",- !isBothSingleLine && "max-h-96 thin-scrollbar overflow-x-auto overflow-y-auto"- )}+ className="relative rounded-lg border border-mineshaft-600 p-2"style={{ backgroundColor: "#081208" }}>- {isVisible ? (- diffContent- ) : (- <div className="ph-no-capture font-mono text-sm text-bunker-300">- {HIDDEN_SECRET_VALUE}- </div>- )}- </div>- <div className="absolute top-1 right-1 z-10" onClick={onToggleVisibility}>- <FontAwesomeIcon- icon={isVisible ? faEyeSlash : faEye}- className="cursor-pointer rounded-md border border-mineshaft-500 bg-mineshaft-800 p-1.5 text-mineshaft-300 hover:bg-mineshaft-700"- />+ {renderSingleLineDiffForApproval(oldValue, newValue, false)}</div>+ );+ }++ return (+ <div+ ref={newDiffContainerRef}+ className="relative max-h-96 thin-scrollbar overflow-x-auto overflow-y-auto rounded-lg border border-mineshaft-600 p-2"+ style={{ backgroundColor: "#081208" }}+ >+ <div className="min-w-max">{renderMultilineDiffForApproval(oldValue, newValue, false)}</div></div>);}