From 970a7adfbdf4a78aec88bb265d087e244d8907b0 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Wed, 5 Oct 2022 19:57:31 -0700 Subject: [PATCH] buy ghost award permission --- files/helpers/const.py | 1 + files/routes/awards.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index edf44e4b8..1b72280f1 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -136,6 +136,7 @@ PERMS = { # Minimum admin_level to perform action. 'BYPASS_PIN_LIMIT': 3, 'VIEW_PENDING_SUBMITTED_MARSEYS': 3, 'VIEW_PENDING_SUBMITTED_HATS': 3, + 'BUY_GHOST_AWARD': 2, } FEATURES = { diff --git a/files/routes/awards.py b/files/routes/awards.py index 2271bd969..28f4829c4 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -51,7 +51,7 @@ def buy(v, award): if award == 'benefactor' and not request.values.get("mb"): return {"error": "You can only buy the Benefactor award with marseybux."}, 403 - if award == 'ghost' and v.admin_level < 2: + if award == 'ghost' and v.admin_level < PERMS['BUY_GHOST_AWARD']: return {"error": "Only admins can buy this award."}, 403 AWARDS = deepcopy(AWARDS2)