From ab93c94bfc63131615d05cf22ec9640d0cf05d93 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 18 Mar 2023 18:11:25 +0200 Subject: [PATCH] add IGNORE_AWARD_IMMUNITY perm --- files/helpers/config/const.py | 1 + files/routes/awards.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index 469cfd9c1..b994ed37f 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -507,6 +507,7 @@ PERMS = { # Minimum admin_level to perform action. 'MODS_EVERY_HOLE': 6, 'MODS_EVERY_GROUP': 6, + 'IGNORE_AWARD_IMMUNITY': 6, } FEATURES = { diff --git a/files/routes/awards.py b/files/routes/awards.py index f85f5a479..96606941c 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -177,7 +177,7 @@ def award_thing(v, thing_type, id): safe_username = f"@{thing.author_name}" - if SITE == 'rdrama.net' and author.id in IMMUNE_TO_AWARDS: + if SITE == 'rdrama.net' and author.id in IMMUNE_TO_AWARDS and v.admin_level < PERMS["IGNORE_AWARD_IMMUNITY"]: abort(403, f"{safe_username} is immune to awards!") if kind == "benefactor" and author.id == v.id: