A cloud instance's licence is issued in HQ and written into the control plane by admin/internal/inject, straight to the database. The customer has nothing to paste, so /settings/license offered them a form that could only ever fail — and on an expired cloud instance, failed at the exact moment they were looking for a way out. GET /license now reports `deployment`, and the page swaps the paste form for a short panel saying where the licence comes from, with a link to the portal when HQ_URL is set. That is the same treatment hq-managed members already get in the members table: read-only here, and a pointer to where it is actually managed. POST /license refuses with 409 cloud_managed on a cloud deployment. Hiding a form is a courtesy; this codebase's rule is that the API is the boundary, and the endpoint was reachable regardless of what the page rendered. It cannot break injection, which never goes through HTTP at all. Verified: server builds and vets clean, web builds clean.
This commit is contained in:
@@ -808,6 +808,8 @@ export interface LicenseInfo {
|
||||
features: Record<string, boolean>;
|
||||
usage: { servers: number; secret_groups: number; channels: number };
|
||||
source: string;
|
||||
/** "cloud" | "self_hosted". A cloud instance's licence is managed in HQ. */
|
||||
deployment: string;
|
||||
}
|
||||
|
||||
// `request` already prefixes /api, so these paths do not repeat it.
|
||||
|
||||
Reference in New Issue
Block a user