Disable updating the cloudron user in demo mode
This commit is contained in:
@@ -423,6 +423,8 @@ function update(user, data, auditSource, callback) {
|
||||
assert(auditSource && typeof auditSource === 'object');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
if (settings.isDemo() && user.username === constants.DEMO_USERNAME) return callback(new BoxError(BoxError.BAD_FIELD, 'Not allowed in demo mode'));
|
||||
|
||||
var error;
|
||||
data = _.pick(data, 'email', 'fallbackEmail', 'displayName', 'username', 'active', 'role');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user