(core) Restoring GRIST_DEFAULT_PRODUCT functionality

Summary: The GRIST_DEFAULT_PRODUCT wasn't used for grist-ee, now it is respected.

Test Plan:
I've build grist-ee docker image from github and run it using our instruction (both for recreating the issue and confirming it is fixed)
```
docker run -p 8484:8484 \
  -v $PWD:/persist \
  -e GRIST_SESSION_SECRET=invent-a-secret-here \
  -e GRIST_SINGLE_ORG=cool-beans
  -it gristlabs/grist-ee
```

For grist-core I recreated/confirmed it is fixed it just by `GRIST_SINGLE_ORG=team npm start` in the core folder.
I also created some team sites using stubbed UI and confirmed that they were using the GRIST_DEFAULT_PRODUCT product.

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D4271
This commit is contained in:
Jarosław Sadziński
2024-06-14 12:12:24 +02:00
parent 40c87f4529
commit 1e2991519f
3 changed files with 5 additions and 6 deletions

View File

@@ -136,7 +136,9 @@ function buildTeamPage({
}
await create();
} finally {
disabled.set(false);
if (!disabled.isDisposed()) {
disabled.set(false);
}
}
}
const clickOnEnter = dom.onKeyPress({

View File

@@ -147,12 +147,11 @@ export const PRODUCTS: IProduct[] = [
*/
export function getDefaultProductNames() {
const defaultProduct = process.env.GRIST_DEFAULT_PRODUCT;
const personalFreePlan = PERSONAL_FREE_PLAN;
return {
// Personal site start off on a functional plan.
personal: defaultProduct || personalFreePlan,
personal: defaultProduct || PERSONAL_FREE_PLAN,
// Team site starts off on a limited plan, requiring subscription.
teamInitial: defaultProduct || 'stub',
teamInitial: defaultProduct || STUB_PLAN,
// Team site that has been 'turned off'.
teamCancel: 'suspended',
// Functional team site.