From 92508d19e65d02b636af174a7b481b21ee326c57 Mon Sep 17 00:00:00 2001 From: carlosmonastyrski Date: Fri, 13 Jun 2025 17:39:15 -0300 Subject: [PATCH] Add a condition to only limit the number of projects to SecretManager --- backend/src/services/project/project-service.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/src/services/project/project-service.ts b/backend/src/services/project/project-service.ts index 370db9405..4650c474d 100644 --- a/backend/src/services/project/project-service.ts +++ b/backend/src/services/project/project-service.ts @@ -265,7 +265,11 @@ export const projectServiceFactory = ({ await tx.raw("SELECT pg_advisory_xact_lock(?)", [PgSqlLock.CreateProject(organization.id)]); const plan = await licenseService.getPlan(organization.id); - if (plan.workspaceLimit !== null && plan.workspacesUsed >= plan.workspaceLimit) { + if ( + plan.workspaceLimit !== null && + plan.workspacesUsed >= plan.workspaceLimit && + type === ProjectType.SecretManager + ) { // case: limit imposed on number of workspaces allowed // case: number of workspaces used exceeds the number of workspaces allowed throw new BadRequestError({