disallow jannies from undoing ban awards

master
Aevann1 2022-11-01 01:05:02 +02:00
parent ce2d90a212
commit 48775dbb5d
1 changed files with 3 additions and 0 deletions

View File

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