mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 02:27:39 +00:00
fix: select all apply to filtered policies only, skip replacing existing policies
This commit is contained in:
+2
-2
@@ -86,7 +86,7 @@ const Content = ({ onClose }: ContentProps) => {
|
|||||||
[...rootPolicyValue, {}],
|
[...rootPolicyValue, {}],
|
||||||
{ shouldDirty: true, shouldTouch: true }
|
{ shouldDirty: true, shouldTouch: true }
|
||||||
);
|
);
|
||||||
} else {
|
} else if (!rootPolicyValue?.length) {
|
||||||
rootForm.setValue(
|
rootForm.setValue(
|
||||||
`permissions.${type}`,
|
`permissions.${type}`,
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
@@ -130,7 +130,7 @@ const Content = ({ onClose }: ContentProps) => {
|
|||||||
setValue(
|
setValue(
|
||||||
"permissions",
|
"permissions",
|
||||||
Object.fromEntries(
|
Object.fromEntries(
|
||||||
Object.values(ProjectPermissionSub).map((subject) => [subject, true])
|
filteredPolicies.map((subject) => [subject, true])
|
||||||
) as TForm["permissions"],
|
) as TForm["permissions"],
|
||||||
{ shouldDirty: true }
|
{ shouldDirty: true }
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user