mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Add basic activation page to grist-ee
Summary: Adds an activation page to grist-ee that currently shows activation status. Follow-up diffs will introduce additional functionality, such as the ability to enter activation keys directly from the activation page. Test Plan: No grist-ee tests (yet). Reviewers: paulfitz Reviewed By: paulfitz Subscribers: dsagal, paulfitz Differential Revision: https://phab.getgrist.com/D3582
This commit is contained in:
@@ -54,7 +54,7 @@ export function makeGristConfig(homeUrl: string|null, extra: Partial<GristLoadCo
|
||||
enableWidgetRepository: Boolean(process.env.GRIST_WIDGET_LIST_URL),
|
||||
survey: Boolean(process.env.DOC_ID_NEW_USER_INFO),
|
||||
tagManagerId: process.env.GOOGLE_TAG_MANAGER_ID,
|
||||
activation: (mreq as RequestWithLogin|undefined)?.activation,
|
||||
activation: getActivation(req as RequestWithLogin | undefined),
|
||||
...extra,
|
||||
};
|
||||
}
|
||||
@@ -184,3 +184,11 @@ function getDocFromConfig(config: GristLoadConfig): Document | null {
|
||||
|
||||
return config.getDoc[config.assignmentId] ?? null;
|
||||
}
|
||||
|
||||
function getActivation(mreq: RequestWithLogin|undefined) {
|
||||
const defaultEmail = process.env.GRIST_DEFAULT_EMAIL;
|
||||
return {
|
||||
...mreq?.activation,
|
||||
isManager: Boolean(defaultEmail && defaultEmail === mreq?.user?.loginEmail),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user