mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-05 15:26:35 +00:00
Fix: Include actor org id
This commit is contained in:
@@ -37,8 +37,20 @@ export const secretBlindIndexServiceFactory = ({
|
|||||||
return Number(secretCount);
|
return Number(secretCount);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getProjectSecrets = async ({ projectId, actorId, actorAuthMethod, actor }: TGetProjectSecretsDTO) => {
|
const getProjectSecrets = async ({
|
||||||
const { hasRole } = await permissionService.getProjectPermission(actor, actorId, projectId, actorAuthMethod);
|
projectId,
|
||||||
|
actorId,
|
||||||
|
actorAuthMethod,
|
||||||
|
actorOrgId,
|
||||||
|
actor
|
||||||
|
}: TGetProjectSecretsDTO) => {
|
||||||
|
const { hasRole } = await permissionService.getProjectPermission(
|
||||||
|
actor,
|
||||||
|
actorId,
|
||||||
|
projectId,
|
||||||
|
actorAuthMethod,
|
||||||
|
actorOrgId
|
||||||
|
);
|
||||||
if (!hasRole(ProjectMembershipRole.Admin)) {
|
if (!hasRole(ProjectMembershipRole.Admin)) {
|
||||||
throw new UnauthorizedError({ message: "User must be admin" });
|
throw new UnauthorizedError({ message: "User must be admin" });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user