disable update of domain in demo mode

we removed the locked flag, so we have to add this check
This commit is contained in:
Girish Ramakrishnan
2020-02-19 10:45:55 -08:00
parent 2870f24bec
commit e7a98025a2
2 changed files with 6 additions and 0 deletions

View File

@@ -251,6 +251,8 @@ function prepareDashboardDomain(domain, auditSource, callback) {
debug(`prepareDashboardDomain: ${domain}`);
if (settings.isDemo()) return callback(new BoxError(BoxError.CONFLICT, 'Not allowed in demo mode'));
domains.get(domain, function (error, domainObject) {
if (error) return callback(error);
@@ -308,6 +310,8 @@ function setDashboardAndMailDomain(domain, auditSource, callback) {
debug(`setDashboardAndMailDomain: ${domain}`);
if (settings.isDemo()) return callback(new BoxError(BoxError.CONFLICT, 'Not allowed in demo mode'));
setDashboardDomain(domain, auditSource, function (error) {
if (error) return callback(error);