Skip to content

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

fix: unlimited users and identities only for enterprise and remove frontend check

Meetb9ecf42fb6cc
diff --git a/backend/src/services/identity/identity-service.ts b/backend/src/services/identity/identity-service.ts
index 78dcdda4e7..121f7cf995 100644
--- a/backend/src/services/identity/identity-service.ts
+++ b/backend/src/services/identity/identity-service.ts
@@ -58,7 +58,8 @@ export const identityServiceFactory = ({
if (!hasRequiredPriviledges) throw new BadRequestError({ message: "Failed to create a more privileged identity" });
const plan = await licenseService.getPlan(orgId);
- 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 allowed
throw new BadRequestError({
message: "Failed to create identity due to identity limit reached. Upgrade plan to create more identities."
diff --git a/backend/src/services/org/org-service.ts b/backend/src/services/org/org-service.ts
index 5b4efb992e..393ebf6cbc 100644
--- a/backend/src/services/org/org-service.ts
+++ b/backend/src/services/org/org-service.ts
@@ -476,19 +476,20 @@ export const orgServiceFactory = ({
});
}
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 allowed
throw new BadRequestError({
message: "Failed to invite member due to member limit reached. Upgrade plan to invite 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 allowed
throw new BadRequestError({
message: "Failed to invite member due to member limit reached. Upgrade plan to invite more members."
});
}
+
const isCustomOrgRole = !Object.values(OrgMembershipRole).includes(organizationRoleSlug as OrgMembershipRole);
if (isCustomOrgRole) {
if (!plan?.rbac)
diff --git a/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentitySection.tsx b/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentitySection.tsx
index d7134dfee4..6531fdc0f8 100644
--- a/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentitySection.tsx
+++ b/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentitySection.tsx
@@ -42,6 +42,8 @@ export const IdentitySection = withPermission(
? subscription.identitiesUsed < subscription.identityLimit
: true;
+ const isEnterprise = subscription?.slug === "enterprise"
+
const onDeleteIdentitySubmit = async (identityId: string) => {
try {
await deleteMutateAsync({
@@ -93,7 +95,7 @@ export const IdentitySection = withPermission(
type="submit"
leftIcon={<FontAwesomeIcon icon={faPlus} />}
onClick={() => {
- if (!isMoreIdentitiesAllowed) {
+ if (!isMoreIdentitiesAllowed && !isEnterprise) {
handlePopUpOpen("upgradePlan", {
description: "You can add more identities if you upgrade your Infisical plan."
});
diff --git a/frontend/src/views/Org/MembersPage/components/OrgMembersTab/components/OrgMembersSection/OrgMembersSection.tsx b/frontend/src/views/Org/MembersPage/components/OrgMembersTab/components/OrgMembersSection/OrgMembersSection.tsx
index a7d73345fa..340295c93f 100644
--- a/frontend/src/views/Org/MembersPage/components/OrgMembersTab/components/OrgMembersSection/OrgMembersSection.tsx
+++ b/frontend/src/views/Org/MembersPage/components/OrgMembersTab/components/OrgMembersSection/OrgMembersSection.tsx
@@ -51,6 +51,8 @@ export const OrgMembersSection = () => {
? subscription.identitiesUsed < subscription.identityLimit
: true;
+ const isEnterprise = subscription?.slug === "enterprise";
+
const handleAddMemberModal = () => {
if (currentOrg?.authEnforced) {
createNotification({
@@ -60,7 +62,7 @@ export const OrgMembersSection = () => {
return;
}
- if (!isMoreUsersAllowed || !isMoreIdentitiesAllowed) {
+ if ((!isMoreUsersAllowed || !isMoreIdentitiesAllowed) && !isEnterprise) {
handlePopUpOpen("upgradePlan", {
description: "You can add more members if you upgrade your Infisical plan."
});