Make sure license gets pushed and saved for default license replacements (#5001)

This commit is contained in:
ConnorYoh 2025-11-25 14:58:33 +00:00 committed by GitHub
parent 2ab7945130
commit 9fcaace8ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 14 deletions

View File

@ -9,7 +9,6 @@ import AvailablePlansSection from '@app/components/shared/config/configSections/
import StaticPlanSection from '@app/components/shared/config/configSections/plan/StaticPlanSection';
import { alert } from '@app/components/toast';
import LocalIcon from '@app/components/shared/LocalIcon';
import { ManageBillingButton } from '@app/components/shared/ManageBillingButton';
import { InfoBanner } from '@app/components/shared/InfoBanner';
import { useLicenseAlert } from '@app/hooks/useLicenseAlert';
import { isSupabaseConfigured } from '@app/services/supabaseClient';
@ -223,18 +222,6 @@ const AdminPlanSection: React.FC = () => {
buttonColor="orange.7"
/>
)}
{/* Manage Subscription Button - Only show if user has active license and Supabase is configured */}
{licenseInfo?.licenseKey && isSupabaseConfigured && (
<Paper withBorder p="md" radius="md">
<Group justify="space-between" align="center">
<Text size="sm" c="dimmed">
{t('plan.manageSubscription.description', 'Manage your subscription, billing, and payment methods')}
</Text>
<ManageBillingButton />
</Group>
</Paper>
)}
<AvailablePlansSection
plans={plans}
currentLicenseInfo={licenseInfo}

View File

@ -79,7 +79,8 @@ export const CheckoutProvider: React.FC<CheckoutProviderProps> = ({
}
// Check if this is an upgrade or new subscription
if (licenseInfo?.licenseKey) {
// Only treat as upgrade if there's a valid PRO/ENTERPRISE license (not NORMAL/free tier)
if (licenseInfo?.licenseType && licenseInfo.licenseType !== 'NORMAL') {
// UPGRADE: Resync existing license with Keygen
console.log('Upgrade detected - resyncing existing license');