From 20ee2118eea62b2dc8dc10523dc43606c4a6ee02 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Fri, 11 Jan 2019 08:12:10 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=A2=E3=83=87=E3=83=AC=E3=83=BC=E3=82=BF?= =?UTF-8?q?=E3=83=BC=E3=82=92=E5=87=8D=E7=B5=90=E3=81=A7=E3=81=8D=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=82=88=E3=81=86=E3=81=AB=E3=81=99=E3=82=8B=20(#3877?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/api/endpoints/admin/suspend-user.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/server/api/endpoints/admin/suspend-user.ts b/src/server/api/endpoints/admin/suspend-user.ts index 5bbd387a20..2ec5196880 100644 --- a/src/server/api/endpoints/admin/suspend-user.ts +++ b/src/server/api/endpoints/admin/suspend-user.ts @@ -37,6 +37,10 @@ export default define(meta, (ps) => new Promise(async (res, rej) => { return rej('cannot suspend admin'); } + if (user.isModerator) { + return rej('cannot suspend moderator'); + } + await User.findOneAndUpdate({ _id: user._id }, {