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