mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 12:27:28 +00:00
fix: legacy permission check
This commit is contained in:
@@ -1127,15 +1127,12 @@ export const secretV2BridgeServiceFactory = ({
|
|||||||
actionProjectType: ActionProjectType.SecretManager
|
actionProjectType: ActionProjectType.SecretManager
|
||||||
});
|
});
|
||||||
|
|
||||||
ForbiddenError.from(permission).throwUnlessCan(
|
CheckForbiddenErrorSecretsSubject(permission, ProjectPermissionSecretActions.ReadValue, {
|
||||||
ProjectPermissionActions.Read,
|
environment: folderWithPath.environmentSlug,
|
||||||
subject(ProjectPermissionSub.Secrets, {
|
secretPath: folderWithPath.path,
|
||||||
environment: folderWithPath.environmentSlug,
|
secretName: secret.key,
|
||||||
secretPath: folderWithPath.path,
|
secretTags: secret.tags.map((i) => i.slug)
|
||||||
secretName: secret.key,
|
});
|
||||||
secretTags: secret.tags.map((i) => i.slug)
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
if (secret.type === SecretType.Personal && secret.userId !== actorId) {
|
if (secret.type === SecretType.Personal && secret.userId !== actorId) {
|
||||||
throw new ForbiddenRequestError({
|
throw new ForbiddenRequestError({
|
||||||
|
|||||||
Reference in New Issue
Block a user