diff --git a/src/routes/user.js b/src/routes/user.js index 4282a2308..6ff139f50 100644 --- a/src/routes/user.js +++ b/src/routes/user.js @@ -235,7 +235,6 @@ function setGroups(req, res, next) { user.setGroups(req.params.userId, req.body.groupIds, function (error) { if (error && error.reason === UserError.NOT_FOUND) return next(new HttpError(404, 'One or more groups not found')); - if (error && error.reason === UserError.NOT_ALLOWED) return next(new HttpError(403, 'Last admin')); if (error) return next(new HttpError(500, error)); next(new HttpSuccess(204)); diff --git a/src/user.js b/src/user.js index bb140f239..ec9fa2b56 100644 --- a/src/user.js +++ b/src/user.js @@ -72,7 +72,6 @@ UserError.BAD_USERNAME = 'Bad username'; UserError.BAD_EMAIL = 'Bad email'; UserError.BAD_PASSWORD = 'Bad password'; UserError.BAD_TOKEN = 'Bad token'; -UserError.NOT_ALLOWED = 'Not Allowed'; function validateUsername(username) { assert.strictEqual(typeof username, 'string');