mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +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