mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 21:27:10 +00:00
Update 20250218020306_backfill-secret-permissions-with-readvalue.ts
This commit is contained in:
+4
-2
@@ -62,8 +62,10 @@ const $updatePermissionsDown = (permissions: unknown) => {
|
|||||||
const { subject, action } = parsedPermission;
|
const { subject, action } = parsedPermission;
|
||||||
|
|
||||||
if (subject === ProjectPermissionSub.Secrets) {
|
if (subject === ProjectPermissionSub.Secrets) {
|
||||||
if (action.includes(SecretActions.ReadValue)) {
|
const readValueIndex = action.indexOf(SecretActions.ReadValue);
|
||||||
action.splice(action.indexOf(SecretActions.ReadValue));
|
|
||||||
|
if (action.includes(SecretActions.ReadValue) && readValueIndex !== -1) {
|
||||||
|
action.splice(readValueIndex, 1);
|
||||||
parsedPermissions[i] = { ...parsedPermission, action };
|
parsedPermissions[i] = { ...parsedPermission, action };
|
||||||
|
|
||||||
shouldUpdate = true;
|
shouldUpdate = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user