make it so ppl with unblockable award cant block others

master
Aevann1 2022-08-30 05:58:25 +02:00
parent a48fb3cd09
commit 26b2f55e68
1 changed files with 3 additions and 0 deletions

View File

@ -615,6 +615,9 @@ def settings_profilecss(v):
@auth_required
def settings_block_user(v):
if v.unblockable:
return {"error": "Users with 'unblockable' award can't block people."}, 403
user = get_user(request.values.get("username"), graceful=True)
if not user: return {"error": "That user doesn't exist."}, 404