mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 10:29:52 +00:00
feat: updated to enum ActionProjectType
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { ForbiddenError, subject } from "@casl/ability";
|
||||
|
||||
import { ProjectOperationType } from "@app/db/schemas";
|
||||
import { ActionProjectType } from "@app/db/schemas";
|
||||
import { TPermissionServiceFactory } from "@app/ee/services/permission/permission-service";
|
||||
import { ProjectPermissionActions, ProjectPermissionSub } from "@app/ee/services/permission/project-permission";
|
||||
import { NotFoundError } from "@app/lib/errors";
|
||||
@@ -87,7 +87,7 @@ export const integrationServiceFactory = ({
|
||||
projectId: integrationAuth.projectId,
|
||||
actorAuthMethod,
|
||||
actorOrgId,
|
||||
projectOperationType: ProjectOperationType.SecretManager
|
||||
projectOperationType: ActionProjectType.SecretManager
|
||||
});
|
||||
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Create, ProjectPermissionSub.Integrations);
|
||||
|
||||
@@ -166,7 +166,7 @@ export const integrationServiceFactory = ({
|
||||
projectId: integration.projectId,
|
||||
actorAuthMethod,
|
||||
actorOrgId,
|
||||
projectOperationType: ProjectOperationType.SecretManager
|
||||
projectOperationType: ActionProjectType.SecretManager
|
||||
});
|
||||
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Edit, ProjectPermissionSub.Integrations);
|
||||
|
||||
@@ -233,7 +233,7 @@ export const integrationServiceFactory = ({
|
||||
projectId: integration.projectId,
|
||||
actorAuthMethod,
|
||||
actorOrgId,
|
||||
projectOperationType: ProjectOperationType.SecretManager
|
||||
projectOperationType: ActionProjectType.SecretManager
|
||||
});
|
||||
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Read, ProjectPermissionSub.Integrations);
|
||||
|
||||
@@ -261,7 +261,7 @@ export const integrationServiceFactory = ({
|
||||
projectId: integration.projectId,
|
||||
actorAuthMethod,
|
||||
actorOrgId,
|
||||
projectOperationType: ProjectOperationType.SecretManager
|
||||
projectOperationType: ActionProjectType.SecretManager
|
||||
});
|
||||
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Read, ProjectPermissionSub.Integrations);
|
||||
|
||||
@@ -304,7 +304,7 @@ export const integrationServiceFactory = ({
|
||||
projectId: integration.projectId,
|
||||
actorAuthMethod,
|
||||
actorOrgId,
|
||||
projectOperationType: ProjectOperationType.SecretManager
|
||||
projectOperationType: ActionProjectType.SecretManager
|
||||
});
|
||||
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Delete, ProjectPermissionSub.Integrations);
|
||||
|
||||
@@ -341,7 +341,7 @@ export const integrationServiceFactory = ({
|
||||
projectId,
|
||||
actorAuthMethod,
|
||||
actorOrgId,
|
||||
projectOperationType: ProjectOperationType.SecretManager
|
||||
projectOperationType: ActionProjectType.SecretManager
|
||||
});
|
||||
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Read, ProjectPermissionSub.Integrations);
|
||||
|
||||
@@ -361,7 +361,7 @@ export const integrationServiceFactory = ({
|
||||
projectId: integration.projectId,
|
||||
actorAuthMethod,
|
||||
actorOrgId,
|
||||
projectOperationType: ProjectOperationType.SecretManager
|
||||
projectOperationType: ActionProjectType.SecretManager
|
||||
});
|
||||
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Read, ProjectPermissionSub.Integrations);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user