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