Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Add a condition to only limit the number of projects to SecretManager
carlosmonastyrski92508d19e65d
diff --git a/backend/src/services/project/project-service.ts b/backend/src/services/project/project-service.tsindex 370db9405a..4650c474d7 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 allowedthrow new BadRequestError({