From 8ac857708190240955df94022da4317f4c9f3ff4 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 7 May 2023 20:03:35 +0300 Subject: [PATCH] remove unfunctional perm --- files/helpers/config/const.py | 1 - files/routes/awards.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index 1899e10fb..fafb461c0 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -465,7 +465,6 @@ PERMS = { # Minimum admin_level to perform action. 'USER_BADGES': 2, 'USER_LINK': 2, 'USER_TITLE_CHANGE': 2, - 'BUY_GHOST_AWARD': 2, 'LOTTERY_VIEW_PARTICIPANTS': 2, 'POST_COMMENT_INFINITE_PINGS': 2, 'IGNORE_1WEEk_EDITING_LIMIT': 2, diff --git a/files/routes/awards.py b/files/routes/awards.py index a2ab64081..d2ff0e59e 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -59,8 +59,8 @@ def shop(v:User): @limiter.limit("100/minute;200/hour;1000/day", key_func=get_ID) @auth_required def buy(v:User, award): - if award == 'ghost' and v.admin_level < PERMS['BUY_GHOST_AWARD']: - abort(403, "Only admins can buy this award") + if award == 'ghost': + abort(403, "You can't buy this award!") AWARDS = deepcopy(AWARDS_ENABLED)