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 typescript issue
IgorHortaf5a8a1b31f00
diff --git a/frontend/src/pages/project/RoleDetailsBySlugPage/components/GeneralPermissionConditions.tsx b/frontend/src/pages/project/RoleDetailsBySlugPage/components/GeneralPermissionConditions.tsxindex 211f17dfa7..66bc3a12a5 100644--- a/frontend/src/pages/project/RoleDetailsBySlugPage/components/GeneralPermissionConditions.tsx+++ b/frontend/src/pages/project/RoleDetailsBySlugPage/components/GeneralPermissionConditions.tsx@@ -11,18 +11,25 @@ type Props = {| ProjectPermissionSub.SecretRotation;};+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 =+ const selectOptions: NonEmptySelectOptions =type === ProjectPermissionSub.SecretRotation- ? [- { value: "environment", label: "Environment Slug" },- { value: "secretPath", label: "Secret Path" },- { value: "connectionId", label: "App Connection Id" }- ]- : [- { value: "environment", label: "Environment Slug" },- { value: "secretPath", label: "Secret Path" }- ];+ ? SECRET_ROTATION_CONDITION_OPTIONS+ : DEFAULT_CONDITION_OPTIONS;return (<ConditionsFields