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
Remove member and identity limits for enterprise saml and ldap login case
Tuan Dang5fa7f5628521
diff --git a/backend/src/ee/services/ldap-config/ldap-config-service.ts b/backend/src/ee/services/ldap-config/ldap-config-service.tsindex 0cbab8c32a..cafc7abf04 100644--- a/backend/src/ee/services/ldap-config/ldap-config-service.ts+++ b/backend/src/ee/services/ldap-config/ldap-config-service.ts@@ -476,14 +476,14 @@ export const ldapConfigServiceFactory = ({});} else {const plan = await licenseService.getPlan(orgId);- if (plan?.memberLimit && plan.membersUsed >= plan.memberLimit) {+ if (plan?.slug !== "enterprise" && plan?.memberLimit && plan.membersUsed >= plan.memberLimit) {// limit imposed on number of members allowed / number of members used exceeds the number of members allowedthrow new BadRequestError({message: "Failed to create new member via LDAP due to member limit reached. Upgrade plan to add more members."});}- if (plan?.identityLimit && plan.identitiesUsed >= plan.identityLimit) {+ if (plan?.slug !== "enterprise" && plan?.identityLimit && plan.identitiesUsed >= plan.identityLimit) {// limit imposed on number of identities allowed / number of identities used exceeds the number of identities allowedthrow new BadRequestError({message: "Failed to create new member via LDAP due to member limit reached. Upgrade plan to add more members."diff --git a/backend/src/ee/services/saml-config/saml-config-service.ts b/backend/src/ee/services/saml-config/saml-config-service.tsindex 2930d06f90..068a455202 100644--- a/backend/src/ee/services/saml-config/saml-config-service.ts+++ b/backend/src/ee/services/saml-config/saml-config-service.ts@@ -421,14 +421,14 @@ export const samlConfigServiceFactory = ({});} else {const plan = await licenseService.getPlan(orgId);- if (plan?.memberLimit && plan.membersUsed >= plan.memberLimit) {+ if (plan?.slug !== "enterprise" && plan?.memberLimit && plan.membersUsed >= plan.memberLimit) {// limit imposed on number of members allowed / number of members used exceeds the number of members allowedthrow new BadRequestError({message: "Failed to create new member via SAML due to member limit reached. Upgrade plan to add more members."});}- if (plan?.identityLimit && plan.identitiesUsed >= plan.identityLimit) {+ if (plan?.slug !== "enterprise" && plan?.identityLimit && plan.identitiesUsed >= plan.identityLimit) {// limit imposed on number of identities allowed / number of identities used exceeds the number of identities allowedthrow new BadRequestError({message: "Failed to create new member via SAML due to member limit reached. Upgrade plan to add more members."