mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 23:26:20 +00:00
Fix: Add missing actor org ID to permission check
This commit is contained in:
@@ -166,6 +166,7 @@ export const projectMembershipServiceFactory = ({
|
|||||||
actorId,
|
actorId,
|
||||||
actorAuthMethod,
|
actorAuthMethod,
|
||||||
actor,
|
actor,
|
||||||
|
actorOrgId,
|
||||||
emails,
|
emails,
|
||||||
usernames,
|
usernames,
|
||||||
sendEmails = true
|
sendEmails = true
|
||||||
@@ -177,7 +178,13 @@ export const projectMembershipServiceFactory = ({
|
|||||||
throw new BadRequestError({ message: "Please upgrade your project on your dashboard" });
|
throw new BadRequestError({ message: "Please upgrade your project on your dashboard" });
|
||||||
}
|
}
|
||||||
|
|
||||||
const { permission } = await permissionService.getProjectPermission(actor, actorId, projectId, actorAuthMethod);
|
const { permission } = await permissionService.getProjectPermission(
|
||||||
|
actor,
|
||||||
|
actorId,
|
||||||
|
projectId,
|
||||||
|
actorAuthMethod,
|
||||||
|
actorOrgId
|
||||||
|
);
|
||||||
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Create, ProjectPermissionSub.Member);
|
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Create, ProjectPermissionSub.Member);
|
||||||
|
|
||||||
const usernamesAndEmails = [...emails, ...usernames];
|
const usernamesAndEmails = [...emails, ...usernames];
|
||||||
|
|||||||
Reference in New Issue
Block a user