UserError.NOT_ALLOWED is not unused

This commit is contained in:
Johannes Zellner
2016-02-11 11:32:48 +01:00
parent 98a7f44dc1
commit ecf7575dd3
2 changed files with 0 additions and 2 deletions

View File

@@ -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));