Skip to content

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

address scott feedback

IgorHorta7ee0d22cd04b
diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ConnectionField.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ConnectionField.tsx
index c2064071f6..6311cac0e6 100644
--- a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ConnectionField.tsx
+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ConnectionField.tsx
@@ -1,12 +1,17 @@
+import { useMemo } from "react";
import { Controller, useFormContext } from "react-hook-form";
import { SingleValue } from "react-select";
+import { subject } from "@casl/ability";
import { faInfoCircle } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { AppConnectionOption } from "@app/components/app-connections";
import { FilterableSelect, FormControl } from "@app/components/v2";
import { ProjectPermissionSub, useProject, useProjectPermission } from "@app/context";
-import { ProjectPermissionAppConnectionActions } from "@app/context/ProjectPermissionContext/types";
+import {
+ ProjectPermissionAppConnectionActions,
+ ProjectPermissionSecretRotationActions
+} from "@app/context/ProjectPermissionContext/types";
import { APP_CONNECTION_MAP } from "@app/helpers/appConnections";
import { SECRET_ROTATION_CONNECTION_MAP } from "@app/helpers/secretRotationsV2";
import { usePopUp } from "@app/hooks";
@@ -27,6 +32,8 @@ export const SecretRotationV2ConnectionField = ({ onChange: callback, isUpdate }
const { popUp, handlePopUpToggle, handlePopUpOpen } = usePopUp(["addConnection"] as const);
const rotationType = watch("type");
+ const environment = watch("environment");
+ const secretPath = watch("secretPath");
const app = SECRET_ROTATION_CONNECTION_MAP[rotationType];
const { currentProject } = useProject();
@@ -36,6 +43,20 @@ export const SecretRotationV2ConnectionField = ({ onChange: callback, isUpdate }
currentProject.id
);
+ const allowedConnections = useMemo(() => {
+ if (!availableConnections) return [];
+ return availableConnections.filter((conn) =>
+ permission.can(
+ ProjectPermissionSecretRotationActions.Create,
+ subject(ProjectPermissionSub.SecretRotation, {
+ connectionId: conn.id,
+ ...(environment?.slug && { environment: environment.slug }),
+ ...(secretPath && { secretPath })
+ })
+ )
+ );
+ }, [availableConnections, permission, environment?.slug, secretPath]);
+
const connectionName = APP_CONNECTION_MAP[app].name;
const canCreateConnection = permission.can(
@@ -91,7 +112,7 @@ export const SecretRotationV2ConnectionField = ({ onChange: callback, isUpdate }
isLoading={isPending}
options={[
...(canCreateConnection ? [{ id: "_create", name: "Create Connection" }] : []),
- ...(availableConnections ?? [])
+ ...allowedConnections
]}
isDisabled={isUpdate}
placeholder="Select connection..."
@@ -104,7 +125,7 @@ export const SecretRotationV2ConnectionField = ({ onChange: callback, isUpdate }
control={control}
name="connection"
/>
- {!isUpdate && !isPending && !availableConnections?.length && !canCreateConnection && (
+ {!isUpdate && !isPending && !allowedConnections.length && !canCreateConnection && (
<p className="-mt-2.5 mb-2.5 text-xs text-yellow">
<FontAwesomeIcon className="mr-1" size="xs" icon={faInfoCircle} />
You do not have access to any {appName} Connections. Contact an admin to create one.
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncConnectionField.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncConnectionField.tsx
index 62542a5702..59d012f04b 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncConnectionField.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncConnectionField.tsx
@@ -1,12 +1,17 @@
+import { useMemo } from "react";
import { Controller, useFormContext } from "react-hook-form";
import { SingleValue } from "react-select";
+import { subject } from "@casl/ability";
import { faInfoCircle } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { AppConnectionOption } from "@app/components/app-connections";
import { FilterableSelect, FormControl } from "@app/components/v2";
import { ProjectPermissionSub, useProject, useProjectPermission } from "@app/context";
-import { ProjectPermissionAppConnectionActions } from "@app/context/ProjectPermissionContext/types";
+import {
+ ProjectPermissionAppConnectionActions,
+ ProjectPermissionSecretSyncActions
+} from "@app/context/ProjectPermissionContext/types";
import { APP_CONNECTION_MAP } from "@app/helpers/appConnections";
import { SECRET_SYNC_CONNECTION_MAP } from "@app/helpers/secretSyncs";
import { usePopUp } from "@app/hooks";
@@ -26,6 +31,8 @@ export const SecretSyncConnectionField = ({ onChange: callback }: Props) => {
const { popUp, handlePopUpToggle, handlePopUpOpen } = usePopUp(["addConnection"] as const);
const destination = watch("destination");
+ const environment = watch("environment");
+ const secretPath = watch("secretPath");
const app = SECRET_SYNC_CONNECTION_MAP[destination];
const { currentProject } = useProject();
@@ -35,6 +42,20 @@ export const SecretSyncConnectionField = ({ onChange: callback }: Props) => {
currentProject.id
);
+ const allowedConnections = useMemo(() => {
+ if (!availableConnections) return [];
+ return availableConnections.filter((conn) =>
+ permission.can(
+ ProjectPermissionSecretSyncActions.Create,
+ subject(ProjectPermissionSub.SecretSyncs, {
+ connectionId: conn.id,
+ ...(environment?.slug && { environment: environment.slug }),
+ ...(secretPath && { secretPath })
+ })
+ )
+ );
+ }, [availableConnections, permission, environment?.slug, secretPath]);
+
const connectionName = APP_CONNECTION_MAP[app].name;
const canCreateConnection = permission.can(
@@ -76,7 +97,7 @@ export const SecretSyncConnectionField = ({ onChange: callback }: Props) => {
isLoading={isPending}
options={[
...(canCreateConnection ? [{ id: "_create", name: "Create Connection" }] : []),
- ...(availableConnections ?? [])
+ ...allowedConnections
]}
placeholder="Select connection..."
getOptionLabel={(option) => option.name}
@@ -88,7 +109,7 @@ export const SecretSyncConnectionField = ({ onChange: callback }: Props) => {
control={control}
name="connection"
/>
- {!isPending && !availableConnections?.length && !canCreateConnection && (
+ {!isPending && !allowedConnections.length && !canCreateConnection && (
<p className="-mt-2.5 mb-2.5 text-xs text-yellow">
<FontAwesomeIcon className="mr-1" size="xs" icon={faInfoCircle} />
You do not have access to any {appName} Connections. Contact an admin to create one.
diff --git a/frontend/src/pages/project/RoleDetailsBySlugPage/components/GeneralPermissionConditions.tsx b/frontend/src/pages/project/RoleDetailsBySlugPage/components/GeneralPermissionConditions.tsx
index 66bc3a12a5..990d3e0fe3 100644
--- a/frontend/src/pages/project/RoleDetailsBySlugPage/components/GeneralPermissionConditions.tsx
+++ b/frontend/src/pages/project/RoleDetailsBySlugPage/components/GeneralPermissionConditions.tsx
@@ -5,38 +5,24 @@ import { ConditionsFields } from "./ConditionsFields";
type Props = {
position?: number;
isDisabled?: boolean;
- type:
- | ProjectPermissionSub.SecretFolders
- | ProjectPermissionSub.SecretImports
- | ProjectPermissionSub.SecretRotation;
+ type: ProjectPermissionSub.SecretFolders | ProjectPermissionSub.SecretImports;
};
type SelectOption = { value: string; label: string };
type NonEmptySelectOptions = [SelectOption, ...SelectOption[]];
-const SECRET_ROTATION_CONDITION_OPTIONS: NonEmptySelectOptions = [
- { value: "environment", label: "Environment Slug" },
- { value: "secretPath", label: "Secret Path" },
- { value: "connectionId", label: "App Connection Id" }
-];
-
const DEFAULT_CONDITION_OPTIONS: NonEmptySelectOptions = [
{ value: "environment", label: "Environment Slug" },
{ value: "secretPath", label: "Secret Path" }
];
export const GeneralPermissionConditions = ({ position = 0, isDisabled, type }: Props) => {
- const selectOptions: NonEmptySelectOptions =
- type === ProjectPermissionSub.SecretRotation
- ? SECRET_ROTATION_CONDITION_OPTIONS
- : DEFAULT_CONDITION_OPTIONS;
-
return (
<ConditionsFields
isDisabled={isDisabled}
subject={type}
position={position}
- selectOptions={selectOptions}
+ selectOptions={DEFAULT_CONDITION_OPTIONS}
/>
);
};
diff --git a/frontend/src/pages/project/RoleDetailsBySlugPage/components/RolePermissionsSection.tsx b/frontend/src/pages/project/RoleDetailsBySlugPage/components/RolePermissionsSection.tsx
index c06a4aaa0c..20a684548d 100644
--- a/frontend/src/pages/project/RoleDetailsBySlugPage/components/RolePermissionsSection.tsx
+++ b/frontend/src/pages/project/RoleDetailsBySlugPage/components/RolePermissionsSection.tsx
@@ -46,6 +46,7 @@ import {
} from "./ProjectRoleModifySection.utils";
import { SecretEventPermissionConditions } from "./SecretEventPermissionConditions";
import { SecretPermissionConditions } from "./SecretPermissionConditions";
+import { SecretRotationPermissionConditions } from "./SecretRotationPermissionConditions";
import { SecretSyncPermissionConditions } from "./SecretSyncPermissionConditions";
import { SshHostPermissionConditions } from "./SshHostPermissionConditions";
@@ -121,6 +122,10 @@ export const renderConditionalComponents = (
return <McpEndpointPermissionConditions isDisabled={isDisabled} />;
}
+ if (subject === ProjectPermissionSub.SecretRotation) {
+ return <SecretRotationPermissionConditions isDisabled={isDisabled} />;
+ }
+
return <GeneralPermissionConditions isDisabled={isDisabled} type={subject} />;
}
diff --git a/frontend/src/pages/project/RoleDetailsBySlugPage/components/SecretRotationPermissionConditions.tsx b/frontend/src/pages/project/RoleDetailsBySlugPage/components/SecretRotationPermissionConditions.tsx
new file mode 100644
index 0000000000..1cac5b6efd
--- /dev/null
+++ b/frontend/src/pages/project/RoleDetailsBySlugPage/components/SecretRotationPermissionConditions.tsx
@@ -0,0 +1,23 @@
+import { ProjectPermissionSub } from "@app/context/ProjectPermissionContext/types";
+
+import { ConditionsFields } from "./ConditionsFields";
+
+type Props = {
+ position?: number;
+ isDisabled?: boolean;
+};
+
+export const SecretRotationPermissionConditions = ({ position = 0, isDisabled }: Props) => {
+ return (
+ <ConditionsFields
+ isDisabled={isDisabled}
+ subject={ProjectPermissionSub.SecretRotation}
+ position={position}
+ selectOptions={[
+ { value: "environment", label: "Environment Slug" },
+ { value: "secretPath", label: "Secret Path" },
+ { value: "connectionId", label: "App Connection ID" }
+ ]}
+ />
+ );
+};
diff --git a/frontend/src/pages/project/RoleDetailsBySlugPage/components/SecretSyncPermissionConditions.tsx b/frontend/src/pages/project/RoleDetailsBySlugPage/components/SecretSyncPermissionConditions.tsx
index 0820915468..2909a81665 100644
--- a/frontend/src/pages/project/RoleDetailsBySlugPage/components/SecretSyncPermissionConditions.tsx
+++ b/frontend/src/pages/project/RoleDetailsBySlugPage/components/SecretSyncPermissionConditions.tsx
@@ -16,7 +16,7 @@ export const SecretSyncPermissionConditions = ({ position = 0, isDisabled }: Pro
selectOptions={[
{ value: "environment", label: "Environment Slug" },
{ value: "secretPath", label: "Secret Path" },
- { value: "connectionId", label: "App Connection Id" }
+ { value: "connectionId", label: "App Connection ID" }
]}
/>
);
diff --git a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncRow.tsx b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncRow.tsx
index 5e00d62afd..64bb031da4 100644
--- a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncRow.tsx
+++ b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncRow.tsx
@@ -123,7 +123,8 @@ export const SecretSyncRow = ({
environment && folder
? subject(ProjectPermissionSub.SecretSyncs, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretSync.connectionId && { connectionId: secretSync.connectionId })
})
: ProjectPermissionSub.SecretSyncs;
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretOverviewSecretRotationRow/SecretOverviewSecretRotationRow.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretOverviewSecretRotationRow/SecretOverviewSecretRotationRow.tsx
index 664838e921..02504c15e2 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretOverviewSecretRotationRow/SecretOverviewSecretRotationRow.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SecretOverviewSecretRotationRow/SecretOverviewSecretRotationRow.tsx
@@ -174,7 +174,10 @@ export const SecretOverviewSecretRotationRow = ({
I={ProjectPermissionSecretRotationActions.ReadGeneratedCredentials}
a={subject(ProjectPermissionSub.SecretRotation, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretRotation.connectionId && {
+ connectionId: secretRotation.connectionId
+ })
})}
renderTooltip
allowedLabel="View Generated Credentials"
@@ -195,7 +198,10 @@ export const SecretOverviewSecretRotationRow = ({
I={ProjectPermissionSecretRotationActions.RotateSecrets}
a={subject(ProjectPermissionSub.SecretRotation, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretRotation.connectionId && {
+ connectionId: secretRotation.connectionId
+ })
})}
renderTooltip
allowedLabel="Rotate Secrets"
@@ -222,7 +228,10 @@ export const SecretOverviewSecretRotationRow = ({
I={ProjectPermissionSecretRotationActions.RotateSecrets}
a={subject(ProjectPermissionSub.SecretRotation, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretRotation.connectionId && {
+ connectionId: secretRotation.connectionId
+ })
})}
renderTooltip
allowedLabel="Reconcile Secret"
@@ -244,7 +253,10 @@ export const SecretOverviewSecretRotationRow = ({
I={ProjectPermissionSecretRotationActions.Edit}
a={subject(ProjectPermissionSub.SecretRotation, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretRotation.connectionId && {
+ connectionId: secretRotation.connectionId
+ })
})}
renderTooltip
allowedLabel="Edit"
@@ -265,7 +277,10 @@ export const SecretOverviewSecretRotationRow = ({
I={ProjectPermissionSecretRotationActions.Delete}
a={subject(ProjectPermissionSub.SecretRotation, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretRotation.connectionId && {
+ connectionId: secretRotation.connectionId
+ })
})}
renderTooltip
allowedLabel="Delete"
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretRotationTableRow/SecretRotationTableRow.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretRotationTableRow/SecretRotationTableRow.tsx
index 258ea61cf9..ce418321db 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretRotationTableRow/SecretRotationTableRow.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SecretRotationTableRow/SecretRotationTableRow.tsx
@@ -183,7 +183,10 @@ export const SecretRotationTableRow = ({
}
a={subject(ProjectPermissionSub.SecretRotation, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretRotation.connectionId && {
+ connectionId: secretRotation.connectionId
+ })
})}
>
{(isAllowed) => (
@@ -206,7 +209,10 @@ export const SecretRotationTableRow = ({
I={ProjectPermissionSecretRotationActions.RotateSecrets}
a={subject(ProjectPermissionSub.SecretRotation, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretRotation.connectionId && {
+ connectionId: secretRotation.connectionId
+ })
})}
>
{(isAllowed) => (
@@ -232,7 +238,10 @@ export const SecretRotationTableRow = ({
I={ProjectPermissionSecretRotationActions.RotateSecrets}
a={subject(ProjectPermissionSub.SecretRotation, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretRotation.connectionId && {
+ connectionId: secretRotation.connectionId
+ })
})}
>
{(isAllowed) => (
@@ -256,7 +265,10 @@ export const SecretRotationTableRow = ({
I={ProjectPermissionSecretRotationActions.Edit}
a={subject(ProjectPermissionSub.SecretRotation, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretRotation.connectionId && {
+ connectionId: secretRotation.connectionId
+ })
})}
renderTooltip
allowedLabel="Edit"
@@ -281,7 +293,10 @@ export const SecretRotationTableRow = ({
I={ProjectPermissionSecretRotationActions.Delete}
a={subject(ProjectPermissionSub.SecretRotation, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretRotation.connectionId && {
+ connectionId: secretRotation.connectionId
+ })
})}
>
{(isAllowed) => (
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationItem.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationItem.tsx
index 44ce8145da..7d3f38e044 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationItem.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationItem.tsx
@@ -139,7 +139,8 @@ export const SecretRotationItem = ({
I={ProjectPermissionSecretRotationActions.ReadGeneratedCredentials}
a={subject(ProjectPermissionSub.SecretRotation, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretRotation.connectionId && { connectionId: secretRotation.connectionId })
})}
renderTooltip
allowedLabel="View Generated Credentials"
@@ -164,7 +165,8 @@ export const SecretRotationItem = ({
I={ProjectPermissionSecretRotationActions.RotateSecrets}
a={subject(ProjectPermissionSub.SecretRotation, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretRotation.connectionId && { connectionId: secretRotation.connectionId })
})}
renderTooltip
allowedLabel="Rotate Secrets"
@@ -195,7 +197,8 @@ export const SecretRotationItem = ({
I={ProjectPermissionSecretRotationActions.RotateSecrets}
a={subject(ProjectPermissionSub.SecretRotation, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretRotation.connectionId && { connectionId: secretRotation.connectionId })
})}
renderTooltip
allowedLabel="Reconcile Secret"
@@ -231,7 +234,8 @@ export const SecretRotationItem = ({
I={ProjectPermissionSecretRotationActions.Edit}
a={subject(ProjectPermissionSub.SecretRotation, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretRotation.connectionId && { connectionId: secretRotation.connectionId })
})}
renderTooltip
allowedLabel="Edit"
@@ -255,7 +259,8 @@ export const SecretRotationItem = ({
I={ProjectPermissionSecretRotationActions.Delete}
a={subject(ProjectPermissionSub.SecretRotation, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretRotation.connectionId && { connectionId: secretRotation.connectionId })
})}
renderTooltip
allowedLabel="Delete"
diff --git a/frontend/src/pages/secret-manager/SecretRotationPage/SecretRotationPage.tsx b/frontend/src/pages/secret-manager/SecretRotationPage/SecretRotationPage.tsx
index c4f8a9cfe6..e853092ad4 100644
--- a/frontend/src/pages/secret-manager/SecretRotationPage/SecretRotationPage.tsx
+++ b/frontend/src/pages/secret-manager/SecretRotationPage/SecretRotationPage.tsx
@@ -1,5 +1,6 @@
import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
+import { subject } from "@casl/ability";
import {
faArrowsSpin,
faArrowUpRightFromSquare,
@@ -253,7 +254,10 @@ const Page = () => {
<div className="flex justify-end space-x-2">
<ProjectPermissionCan
I={ProjectPermissionSecretRotationActions.Edit}
- a={ProjectPermissionSub.SecretRotation}
+ a={subject(ProjectPermissionSub.SecretRotation, {
+ environment: environment.slug,
+ secretPath
+ })}
allowedLabel="Rotate now"
renderTooltip
>
@@ -275,7 +279,10 @@ const Page = () => {
</ProjectPermissionCan>
<ProjectPermissionCan
I={ProjectPermissionSecretRotationActions.Delete}
- a={ProjectPermissionSub.SecretRotation}
+ a={subject(ProjectPermissionSub.SecretRotation, {
+ environment: environment.slug,
+ secretPath
+ })}
allowedLabel="Rotate now"
renderTooltip
>
diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncActionTriggers.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncActionTriggers.tsx
index 5e00d8eb51..a075cf4a35 100644
--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncActionTriggers.tsx
+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncActionTriggers.tsx
@@ -120,7 +120,8 @@ export const SecretSyncActionTriggers = ({ secretSync }: Props) => {
environment && folder
? subject(ProjectPermissionSub.SecretSyncs, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretSync.connectionId && { connectionId: secretSync.connectionId })
})
: ProjectPermissionSub.SecretSyncs;
diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SecretSyncDestinatonSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SecretSyncDestinatonSection.tsx
index c3551205b0..3fbe243be2 100644
--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SecretSyncDestinatonSection.tsx
+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SecretSyncDestinatonSection.tsx
@@ -176,7 +176,8 @@ export const SecretSyncDestinationSection = ({ secretSync, onEditDestination }:
environment && folder
? subject(ProjectPermissionSub.SecretSyncs, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretSync.connectionId && { connectionId: secretSync.connectionId })
})
: ProjectPermissionSub.SecretSyncs;
diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsx
index 3b9699bd98..a793d06185 100644
--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsx
+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsx
@@ -38,7 +38,8 @@ export const SecretSyncDetailsSection = ({ secretSync, onEditDetails }: Props) =
environment && folder
? subject(ProjectPermissionSub.SecretSyncs, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretSync.connectionId && { connectionId: secretSync.connectionId })
})
: ProjectPermissionSub.SecretSyncs;
diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/SecretSyncOptionsSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/SecretSyncOptionsSection.tsx
index 485b4ea8e2..02251d15e8 100644
--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/SecretSyncOptionsSection.tsx
+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/SecretSyncOptionsSection.tsx
@@ -87,7 +87,8 @@ export const SecretSyncOptionsSection = ({ secretSync, onEditOptions }: Props) =
environment && folder
? subject(ProjectPermissionSub.SecretSyncs, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretSync.connectionId && { connectionId: secretSync.connectionId })
})
: ProjectPermissionSub.SecretSyncs;
diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncSourceSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncSourceSection.tsx
index bbb34d8773..7b07800095 100644
--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncSourceSection.tsx
+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncSourceSection.tsx
@@ -23,7 +23,8 @@ export const SecretSyncSourceSection = ({ secretSync, onEditSource }: Props) =>
environment && folder
? subject(ProjectPermissionSub.SecretSyncs, {
environment: environment.slug,
- secretPath: folder.path
+ secretPath: folder.path,
+ ...(secretSync.connectionId && { connectionId: secretSync.connectionId })
})
: ProjectPermissionSub.SecretSyncs;