From 48775dbb5d69969bb9f96e54fc1c530a99242cb1 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 1 Nov 2022 01:05:02 +0200 Subject: [PATCH] disallow jannies from undoing ban awards --- files/routes/admin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/routes/admin.py b/files/routes/admin.py index 6ecd2bfb3..fc1562624 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1029,6 +1029,9 @@ def unban_user(user_id, v): if not user.is_banned: abort(400) + if user.ban_reason and user.ban_reason.startswith('1-Day ban award'): + abort(403, "You can't undo a ban award!") + user.is_banned = 0 user.unban_utc = 0 user.ban_reason = None