From c2109fd61122f2d0dbfd8fdf682f3a95cfbaf86b Mon Sep 17 00:00:00 2001 From: justcool393 Date: Wed, 5 Oct 2022 20:10:57 -0700 Subject: [PATCH] modmail viewing perm --- files/helpers/const.py | 1 + files/routes/notifications.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index 39db2e7f1..285b12450 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -140,6 +140,7 @@ PERMS = { # Minimum admin_level to perform action. 'BUY_GHOST_AWARD': 2, 'LOTTERY_ADMIN': 3, 'LOTTERY_VIEW_PARTICIPANTS': 2, + 'VIEW_MODMAIL': 2, } FEATURES = { diff --git a/files/routes/notifications.py b/files/routes/notifications.py index 2ac12f904..900f79773 100644 --- a/files/routes/notifications.py +++ b/files/routes/notifications.py @@ -36,7 +36,7 @@ def unread(v): @app.get("/notifications/modmail") -@admin_level_required(2) +@admin_level_required(PERMS['VIEW_MODMAIL']) def notifications_modmail(v): try: page = max(int(request.values.get("page", 1)), 1) except: page = 1