[Billing for self host] End dummy enterprise key validity (#19560)

<img width="1504" height="755" alt="Screenshot 2026-04-10 at 16 40 07"
src="https://github.com/user-attachments/assets/68a12e40-a077-48df-9e18-885493520a32"
/>


Re-using hasValidEnterpriseKey to avoid breaking changes. 
This will be entirely removed in the next versions.
This commit is contained in:
Marie
2026-04-15 15:26:38 +02:00
committed by GitHub
parent 762fb6fd64
commit 2fccd194f3
9 changed files with 140 additions and 50 deletions
@@ -6,7 +6,7 @@ import { InformationBannerBillingSubscriptionPaused } from '@/information-banner
import { InformationBannerEndTrialPeriod } from '@/information-banner/components/billing/InformationBannerEndTrialPeriod';
import { InformationBannerFailPaymentInfo } from '@/information-banner/components/billing/InformationBannerFailPaymentInfo';
import { InformationBannerNoBillingSubscription } from '@/information-banner/components/billing/InformationBannerNoBillingSubscription';
import { InformationBannerLegacyEnterpriseKey } from '@/information-banner/components/enterprise/InformationBannerLegacyEnterpriseKey';
import { InformationBannerInvalidEnterpriseKey } from '@/information-banner/components/enterprise/InformationBannerInvalidEnterpriseKey';
import { InformationBannerMaintenance } from '@/information-banner/components/maintenance/InformationBannerMaintenance';
import { InformationBannerReconnectAccountEmailAliases } from '@/information-banner/components/reconnect-account/InformationBannerReconnectAccountEmailAliases';
import { InformationBannerReconnectAccountInsufficientPermissions } from '@/information-banner/components/reconnect-account/InformationBannerReconnectAccountInsufficientPermissions';
@@ -55,7 +55,7 @@ export const InformationBannerWrapper = () => {
return (
<StyledInformationBannerWrapper>
<InformationBannerMaintenance />
<InformationBannerLegacyEnterpriseKey />
<InformationBannerInvalidEnterpriseKey />
{isAccountSyncEnabled && (
<InformationBannerReconnectAccountInsufficientPermissions />
)}
@@ -9,9 +9,9 @@ import { SettingsPath } from 'twenty-shared/types';
import { getSettingsPath } from 'twenty-shared/utils';
import { IconKey } from 'twenty-ui/display';
const COMPONENT_INSTANCE_ID = 'information-banner-legacy-enterprise-key';
const COMPONENT_INSTANCE_ID = 'information-banner-invalid-enterprise-key';
export const InformationBannerLegacyEnterpriseKey = () => {
export const InformationBannerInvalidEnterpriseKey = () => {
const { t } = useLingui();
const navigate = useNavigate();
const currentWorkspace = useAtomStateValue(currentWorkspaceState);
@@ -21,11 +21,12 @@ export const InformationBannerLegacyEnterpriseKey = () => {
COMPONENT_INSTANCE_ID,
);
const hasLegacyKey =
const hasInvalidKey =
currentWorkspace?.hasValidEnterpriseKey === true &&
currentWorkspace?.hasValidSignedEnterpriseKey !== true;
currentWorkspace?.hasValidSignedEnterpriseKey !== true &&
currentWorkspace?.hasValidEnterpriseValidityToken !== true;
if (!hasLegacyKey) {
if (!hasInvalidKey) {
return null;
}
@@ -33,7 +34,7 @@ export const InformationBannerLegacyEnterpriseKey = () => {
<InformationBanner
componentInstanceId={COMPONENT_INSTANCE_ID}
variant="secondary"
message={t`Your enterprise key format is deprecated. Please activate a new key to keep enterprise features.`}
message={t`Your enterprise key is no longer valid. Activate a new key to continue using enterprise features.`}
buttonTitle={t`Activate`}
buttonIcon={IconKey}
buttonOnClick={() =>