mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 16:27:40 +00:00
improvement: use secret path input for create policy modal
This commit is contained in:
+3
-1
@@ -21,6 +21,7 @@ import {
|
|||||||
Tag,
|
Tag,
|
||||||
Tooltip
|
Tooltip
|
||||||
} from "@app/components/v2";
|
} from "@app/components/v2";
|
||||||
|
import { SecretPathInput } from "@app/components/v2/SecretPathInput";
|
||||||
import { useWorkspace } from "@app/context";
|
import { useWorkspace } from "@app/context";
|
||||||
import { getMemberLabel } from "@app/helpers/members";
|
import { getMemberLabel } from "@app/helpers/members";
|
||||||
import { policyDetails } from "@app/helpers/policies";
|
import { policyDetails } from "@app/helpers/policies";
|
||||||
@@ -202,6 +203,7 @@ const Form = ({
|
|||||||
|
|
||||||
const formUserBypassers = watch("userBypassers");
|
const formUserBypassers = watch("userBypassers");
|
||||||
const formGroupBypassers = watch("groupBypassers");
|
const formGroupBypassers = watch("groupBypassers");
|
||||||
|
const formEnvironment = watch("environment")?.slug;
|
||||||
const bypasserCount = (formUserBypassers || []).length + (formGroupBypassers || []).length;
|
const bypasserCount = (formUserBypassers || []).length + (formGroupBypassers || []).length;
|
||||||
|
|
||||||
const handleCreatePolicy = async ({
|
const handleCreatePolicy = async ({
|
||||||
@@ -469,7 +471,7 @@ const Form = ({
|
|||||||
errorText={error?.message}
|
errorText={error?.message}
|
||||||
className="flex-1"
|
className="flex-1"
|
||||||
>
|
>
|
||||||
<Input {...field} value={field.value || ""} />
|
<SecretPathInput {...field} value={field.value} environment={formEnvironment} />
|
||||||
</FormControl>
|
</FormControl>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user