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

This commit is contained in:
Meet
2024-09-14 05:54:50 +05:30
parent 5150c102e6
commit b9ecf42fb6
4 changed files with 11 additions and 5 deletions
@@ -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."
});
@@ -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."
});