mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) add minimal support for activation keys
Summary: For grist-ee, expect an activation key in environment variable `GRIST_ACTIVATION` or in a file pointed to by `GRIST_ACTIVATION_FILE`. In absence of key, start a 30-day trial, during which a banner is shown. Once trial expires, installation goes into document-read-only mode. Test Plan: added a test Reviewers: dsagal Reviewed By: dsagal Subscribers: jarek Differential Revision: https://phab.getgrist.com/D3426
This commit is contained in:
@@ -518,6 +518,23 @@ export interface GristLoadConfig {
|
||||
|
||||
// Google Tag Manager id. Currently only used to load tag manager for reporting new sign-ups.
|
||||
tagManagerId?: string;
|
||||
|
||||
activation?: ActivationState;
|
||||
}
|
||||
|
||||
/**
|
||||
* For a packaged version of Grist that requires activation, this
|
||||
* summarizes the current state. Not applicable to grist-core.
|
||||
*/
|
||||
export interface ActivationState {
|
||||
trial?: { // Present when installation has not yet been activated.
|
||||
days: number; // Max number of days allowed prior to activation.
|
||||
daysLeft: number; // Number of days left until Grist will get cranky.
|
||||
}
|
||||
needKey?: boolean; // Set when Grist is cranky and demanding activation.
|
||||
key?: { // Set when Grist is activated.
|
||||
daysLeft?: number; // Number of days until Grist will need reactivation.
|
||||
}
|
||||
}
|
||||
|
||||
// Acceptable org subdomains are alphanumeric (hyphen also allowed) and of
|
||||
|
||||
Reference in New Issue
Block a user