aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r--server/middlewares/validators/users.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/middlewares/validators/users.js b/server/middlewares/validators/users.js
index d541e9124..02e4f34cb 100644
--- a/server/middlewares/validators/users.js
+++ b/server/middlewares/validators/users.js
@@ -47,6 +47,8 @@ function usersRemove (req, res, next) {
47 47
48 if (!user) return res.status(404).send('User not found') 48 if (!user) return res.status(404).send('User not found')
49 49
50 if (user.username === 'root') return res.status(400).send('Cannot remove the root user')
51
50 next() 52 next()
51 }) 53 })
52 }) 54 })