Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

feat: extend enforceIdentityLimit gate to member-creation seat-limit check

Tre Dubravae39fb52e1d6b
diff --git a/backend/src/ee/services/license/license-fns.ts b/backend/src/ee/services/license/license-fns.ts
index 3ac5621b0c..e4a9c9223a 100644
--- a/backend/src/ee/services/license/license-fns.ts
+++ b/backend/src/ee/services/license/license-fns.ts
@@ -196,8 +196,9 @@ export const throwOnPlanSeatLimitReached = async (
type?: UserAliasType
) => {
const plan = await licenseService.getPlan(orgId);
+ const isEnterpriseBypass = plan?.slug === "enterprise" && !plan?.enforceIdentityLimit;
- if (plan?.slug !== "enterprise" && plan?.identityLimit && plan.identitiesUsed >= plan.identityLimit) {
+ if (!isEnterpriseBypass && plan?.identityLimit && plan.identitiesUsed >= plan.identityLimit) {
// limit imposed on number of identities allowed / number of identities used exceeds the number of identities allowed
throw new BadRequestError({
message: `Failed to create new member${type ? ` via ${type.toUpperCase()}` : ""} due to member limit reached. Upgrade plan to add more members.`