mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-10 02:41:14 +00:00
fix(licensing): resolve Admiral variant detection and lifetime license handling (#376)
* fix(licensing): resolve Admiral variant detection and lifetime license handling The Lemon Squeezy variant name for Admiral licenses contains "Admiral" (not "Team"), but getVariant() only checked for "team" and "personal". This caused Admiral licenses to be misidentified as Skipper, locking all Admiral-exclusive features. - Map "admiral" variant names to internal "team" value, "skipper" to "personal" - Add isLifetime field to LicenseInfo API response - Hide "Manage Subscription" button for lifetime licenses (no billing portal) - Show "Duration: Lifetime" instead of empty renewal date - Hide upgrade cards for active Admiral users - Add 23 unit tests covering variant resolution, tier computation, and lifetime detection - Add troubleshooting entries for wrong tier label, locked features, and billing portal errors * fix(licensing): address code review findings - Fix nested ternary in LicenseSection JSX; restore conditional rendering to avoid showing an empty "N/A" row for non-subscription states - Clean up test file: use shared svc variable, remove redundant comments, add trialDaysRemaining assertions, rename describe block
This commit is contained in:
@@ -75,9 +75,13 @@ Once your license is active, you can manage your subscription in two ways:
|
||||
- **From the profile menu:** Click your profile icon in the top bar and select **Billing** for quick access to the same portal.
|
||||
|
||||
<Frame>
|
||||
<img src="/images/licensing/license-active.png" alt="License settings showing an active Admiral subscription with Manage Subscription button" />
|
||||
<img src="/images/licensing/license-admiral-active.png" alt="License settings showing an active Admiral subscription with Manage Subscription button" />
|
||||
</Frame>
|
||||
|
||||
### Lifetime licenses
|
||||
|
||||
Lifetime licenses do not have a recurring subscription, so the **Manage Subscription** button is not shown. Instead, the license card displays **Duration: Lifetime** to confirm your license never expires. All other features (deactivation, multi-node enforcement, validation) work the same as subscription licenses.
|
||||
|
||||
## Multi-node license enforcement
|
||||
|
||||
If you manage multiple servers through Sencho's [multi-node feature](/features/multi-node), you only need a license on your **primary instance**. All remote nodes automatically inherit the primary's license tier for proxied requests. No per-node activation is required.
|
||||
@@ -93,3 +97,5 @@ To transfer your license to a different instance:
|
||||
3. On your new instance, activate the same license key.
|
||||
|
||||
Deactivation reverts the current instance to the Community tier immediately.
|
||||
|
||||
Having trouble with your license? See the [Troubleshooting](/operations/troubleshooting#license-tier-shows-the-wrong-name) page for solutions to common licensing issues.
|
||||
|
||||
Reference in New Issue
Block a user