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
fix: update paywall to show correct plan: team -> pro/enterprise
Piyush Guptacee47af0f8de
diff --git a/frontend/src/components/license/UpgradePlanModal/UpgradePlanModal.tsx b/frontend/src/components/license/UpgradePlanModal/UpgradePlanModal.tsxindex 17c0777f19..2279d6f8df 100644--- a/frontend/src/components/license/UpgradePlanModal/UpgradePlanModal.tsx+++ b/frontend/src/components/license/UpgradePlanModal/UpgradePlanModal.tsx@@ -8,22 +8,40 @@ type Props = {isOpen?: boolean;onOpenChange?: (isOpen: boolean) => void;text: string;+ isEnterpriseFeature?: boolean;};-export const UpgradePlanModal = ({ text, isOpen, onOpenChange }: Props): JSX.Element => {+export const UpgradePlanModal = ({+ text,+ isOpen,+ onOpenChange,+ isEnterpriseFeature = false+}: Props): JSX.Element => {const { subscription } = useSubscription();const { currentOrg } = useOrganization();const { mutateAsync, isPending } = useGetOrgTrialUrl();- const link =- subscription && subscription.slug !== null- ? ("/organization/billing" as const)- : "https://infisical.com/scheduledemo";++ const getLink = () => {+ // self-hosting+ if (!subscription || subscription.slug === null) {+ return "https://infisical.com/scheduledemo";+ }++ // Infisical cloud+ if (isEnterpriseFeature) {+ return "https://infisical.com/talk-to-us";+ }++ return "/organization/billing" as const;+ };++ const link = getLink();const handleUpgradeBtnClick = async () => {try {if (!subscription || !currentOrg) return;- if (!subscription.has_used_trial) {+ if (!subscription.has_used_trial && !isEnterpriseFeature) {// direct user to start pro trialconst url = await mutateAsync({@@ -40,6 +58,17 @@ export const UpgradePlanModal = ({ text, isOpen, onOpenChange }: Props): JSX.Eleconsole.error(err);}};+ const getUpgradePlanLabel = () => {+ if (subscription) {+ if (isEnterpriseFeature) {+ return "Talk to Us";+ }+ if (!subscription.has_used_trial) {+ return "Start Pro Free Trial";+ }+ }+ return "Upgrade Plan";+ };return (<Modal isOpen={isOpen} onOpenChange={onOpenChange}>@@ -55,7 +84,7 @@ export const UpgradePlanModal = ({ text, isOpen, onOpenChange }: Props): JSX.EleonClick={handleUpgradeBtnClick}className="mr-4">- {subscription && !subscription.has_used_trial ? "Start Pro Free Trial" : "Upgrade Plan"}+ {getUpgradePlanLabel()}</Button><ButtoncolorSchema="secondary"diff --git a/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx b/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsxindex d49121e86d..bd0ae4b165 100644--- a/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx+++ b/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx@@ -1172,7 +1172,9 @@ export const OverviewPage = () => {handlePopUpClose("misc");return;}- handlePopUpOpen("upgradePlan");+ handlePopUpOpen("upgradePlan", {+ isEnterpriseFeature: true+ });}}isDisabled={userAvailableDynamicSecretEnvs.length === 0}variant="outline_bg"@@ -1679,10 +1681,11 @@ export const OverviewPage = () => {<UpgradePlanModalisOpen={popUp.upgradePlan.isOpen}onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}+ isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}text={subscription.slug === null? "You can perform this action under an Enterprise license"- : "You can perform this action if you switch to Infisical's Team plan"+ : "You can perform this action if you switch to Infisical's Enterprise plan"}/>)}diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/ActionBar.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/ActionBar.tsxindex 182bb1d805..efee5f313b 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/ActionBar.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/ActionBar/ActionBar.tsx@@ -1019,7 +1019,9 @@ export const ActionBar = ({handlePopUpClose("misc");return;}- handlePopUpOpen("upgradePlan");+ handlePopUpOpen("upgradePlan", {+ isEnterpriseFeature: true+ });}}isDisabled={!isAllowed}variant="outline_bg"@@ -1274,10 +1276,13 @@ export const ActionBar = ({<UpgradePlanModalisOpen={popUp.upgradePlan.isOpen}onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}+ isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}text={subscription.slug === null? "You can perform this action under an Enterprise license"- : "You can perform this action if you switch to Infisical's Team plan"+ : `You can perform this action if you switch to Infisical's ${+ popUp.upgradePlan.data.isEnterpriseFeature ? "Enterprise" : "Pro"+ } plan`}/>)}diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/EnvironmentTabs/EnvironmentTabs.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/EnvironmentTabs/EnvironmentTabs.tsxindex 9fee4ed922..ffdd8c6c8b 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/EnvironmentTabs/EnvironmentTabs.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/EnvironmentTabs/EnvironmentTabs.tsx@@ -226,7 +226,7 @@ export const EnvironmentTabs = ({ secretPath }: Props) => {<UpgradePlanModalisOpen={popUp.upgradePlan.isOpen}onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}- text="You can add custom environments if you switch to Infisical's Team plan."+ text="You can add custom environments if you switch to Infisical's Pro plan."/><AddEnvironmentModalisOpen={popUp.createEnvironment.isOpen}diff --git a/frontend/src/pages/secret-manager/SecretRotationPage/SecretRotationPage.tsx b/frontend/src/pages/secret-manager/SecretRotationPage/SecretRotationPage.tsxindex 600ab3710c..8efa28a63a 100644--- a/frontend/src/pages/secret-manager/SecretRotationPage/SecretRotationPage.tsx+++ b/frontend/src/pages/secret-manager/SecretRotationPage/SecretRotationPage.tsx@@ -397,7 +397,7 @@ const Page = () => {<UpgradePlanModalisOpen={popUp.upgradePlan.isOpen}onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}- text="You can add secret rotation if you switch to Infisical's Team plan."+ text="You can add secret rotation if you switch to Infisical's Pro plan."/><ModalisOpen={popUp.secretRotationV2.isOpen}diff --git a/frontend/src/pages/secret-manager/SettingsPage/components/EnvironmentSection/EnvironmentSection.tsx b/frontend/src/pages/secret-manager/SettingsPage/components/EnvironmentSection/EnvironmentSection.tsxindex ff9d217cb7..1105d60a27 100644--- a/frontend/src/pages/secret-manager/SettingsPage/components/EnvironmentSection/EnvironmentSection.tsx+++ b/frontend/src/pages/secret-manager/SettingsPage/components/EnvironmentSection/EnvironmentSection.tsx@@ -123,7 +123,7 @@ export const EnvironmentSection = () => {<UpgradePlanModalisOpen={popUp.upgradePlan.isOpen}onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}- text="You can add custom environments if you switch to Infisical's Team plan."+ text="You can add custom environments if you switch to Infisical's Pro plan."/></div>);