buy ghost award permission

remotes/1693176582716663532/tmp_refs/heads/watchparty
justcool393 2022-10-05 19:57:31 -07:00
parent 0349862531
commit 970a7adfbd
2 changed files with 2 additions and 1 deletions

View File

@ -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 = {

View File

@ -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)