remove unfunctional perm

pull/146/head
Aevann 2023-05-07 20:03:35 +03:00
parent 73520f288c
commit 8ac8577081
2 changed files with 2 additions and 3 deletions

View File

@ -465,7 +465,6 @@ PERMS = { # Minimum admin_level to perform action.
'USER_BADGES': 2,
'USER_LINK': 2,
'USER_TITLE_CHANGE': 2,
'BUY_GHOST_AWARD': 2,
'LOTTERY_VIEW_PARTICIPANTS': 2,
'POST_COMMENT_INFINITE_PINGS': 2,
'IGNORE_1WEEk_EDITING_LIMIT': 2,

View File

@ -59,8 +59,8 @@ def shop(v:User):
@limiter.limit("100/minute;200/hour;1000/day", key_func=get_ID)
@auth_required
def buy(v:User, award):
if award == 'ghost' and v.admin_level < PERMS['BUY_GHOST_AWARD']:
abort(403, "Only admins can buy this award")
if award == 'ghost':
abort(403, "You can't buy this award!")
AWARDS = deepcopy(AWARDS_ENABLED)