modmail viewing perm

master
justcool393 2022-10-05 20:10:57 -07:00
parent d709334180
commit c2109fd611
2 changed files with 2 additions and 1 deletions

View File

@ -140,6 +140,7 @@ PERMS = { # Minimum admin_level to perform action.
'BUY_GHOST_AWARD': 2, 'BUY_GHOST_AWARD': 2,
'LOTTERY_ADMIN': 3, 'LOTTERY_ADMIN': 3,
'LOTTERY_VIEW_PARTICIPANTS': 2, 'LOTTERY_VIEW_PARTICIPANTS': 2,
'VIEW_MODMAIL': 2,
} }
FEATURES = { FEATURES = {

View File

@ -36,7 +36,7 @@ def unread(v):
@app.get("/notifications/modmail") @app.get("/notifications/modmail")
@admin_level_required(2) @admin_level_required(PERMS['VIEW_MODMAIL'])
def notifications_modmail(v): def notifications_modmail(v):
try: page = max(int(request.values.get("page", 1)), 1) try: page = max(int(request.values.get("page", 1)), 1)
except: page = 1 except: page = 1