feat: updated to enum ActionProjectType

This commit is contained in:
=
2025-01-14 23:26:18 +05:30
parent d721a46ec9
commit 6f38d6c76f
46 changed files with 347 additions and 350 deletions
@@ -1,4 +1,4 @@
import { ProjectMembershipRole, ProjectOperationType } from "@app/db/schemas";
import { ActionProjectType, ProjectMembershipRole } from "@app/db/schemas";
import { TPermissionServiceFactory } from "@app/ee/services/permission/permission-service";
import { ForbiddenRequestError, NotFoundError } from "@app/lib/errors";
@@ -37,7 +37,7 @@ export const secretBlindIndexServiceFactory = ({
projectId,
actorAuthMethod,
actorOrgId,
projectOperationType: ProjectOperationType.SecretManager
projectOperationType: ActionProjectType.SecretManager
});
const secretCount = await secretBlindIndexDAL.countOfSecretsWithNullSecretBlindIndex(projectId);
@@ -57,7 +57,7 @@ export const secretBlindIndexServiceFactory = ({
projectId,
actorAuthMethod,
actorOrgId,
projectOperationType: ProjectOperationType.SecretManager
projectOperationType: ActionProjectType.SecretManager
});
if (!hasRole(ProjectMembershipRole.Admin)) {
throw new ForbiddenRequestError({ message: "Insufficient privileges, user must be admin" });
@@ -81,7 +81,7 @@ export const secretBlindIndexServiceFactory = ({
projectId,
actorAuthMethod,
actorOrgId,
projectOperationType: ProjectOperationType.SecretManager
projectOperationType: ActionProjectType.SecretManager
});
if (!hasRole(ProjectMembershipRole.Admin)) {
throw new ForbiddenRequestError({ message: "Insufficient privileges, user must be admin" });