mirror of
https://github.com/Infisical/infisical.git
synced 2025-03-31 22:09:57 +00:00
feat: added filter folder to remove read only in migration
This commit is contained in:
@ -798,11 +798,13 @@ export const backfillPermissionV1SchemaToV2Schema = (data: z.infer<typeof Projec
|
||||
};
|
||||
});
|
||||
|
||||
return formattedData.concat(
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore-error this is valid ts
|
||||
secretImportPolicies,
|
||||
dynamicSecretPolicies,
|
||||
hasReadOnlyFolder.length ? [] : secretFolderPolicies
|
||||
);
|
||||
return formattedData
|
||||
.filter((i) => i.subject !== ProjectPermissionSub.SecretFolders)
|
||||
.concat(
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore-error this is valid ts
|
||||
secretImportPolicies,
|
||||
dynamicSecretPolicies,
|
||||
hasReadOnlyFolder.length ? [] : secretFolderPolicies
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user