demo is just a constant, not a setting

This commit is contained in:
Girish Ramakrishnan
2023-08-04 14:13:30 +05:30
parent d79d24efad
commit 6aad89ae6e
10 changed files with 21 additions and 24 deletions

View File

@@ -144,7 +144,7 @@ async function getConfig() {
mailFqdn: settings.mailFqdn(),
version: constants.VERSION,
ubuntuVersion,
isDemo: settings.isDemo(),
isDemo: constants.DEMO,
cloudronName: await branding.getCloudronName(),
footer: await branding.renderFooter(),
features: appstore.getFeatures(),
@@ -159,7 +159,7 @@ async function prepareDashboardDomain(domain, auditSource) {
debug(`prepareDashboardDomain: ${domain}`);
if (settings.isDemo()) throw new BoxError(BoxError.CONFLICT, 'Not allowed in demo mode');
if (constants.DEMO) throw new BoxError(BoxError.CONFLICT, 'Not allowed in demo mode');
const fqdn = dns.fqdn(constants.DASHBOARD_SUBDOMAIN, domain);
@@ -197,7 +197,7 @@ async function updateDashboardDomain(domain, auditSource) {
debug(`updateDashboardDomain: ${domain}`);
if (settings.isDemo()) throw new BoxError(BoxError.CONFLICT, 'Not allowed in demo mode');
if (constants.DEMO) throw new BoxError(BoxError.CONFLICT, 'Not allowed in demo mode');
await setDashboardDomain(domain, auditSource);