diff --git a/server/routes/user/index.ts b/server/routes/user/index.ts index 2ddc700fc..0c9046918 100644 --- a/server/routes/user/index.ts +++ b/server/routes/user/index.ts @@ -281,7 +281,7 @@ router.delete<{ id: string }>( }); } - if (user.hasPermission(Permission.ADMIN)) { + if (user.hasPermission(Permission.ADMIN) && req.user?.id !== 1) { return next({ status: 405, message: 'You cannot delete users with administrative privileges.',