|
|
@ -10,7 +10,6 @@ from typing import Optional |
|
|
|
from marshmallow import ValidationError |
|
|
|
from marshmallow.fields import String |
|
|
|
from pyramid.httpexceptions import ( |
|
|
|
HTTPBadRequest, |
|
|
|
HTTPForbidden, |
|
|
|
HTTPUnauthorized, |
|
|
|
HTTPUnprocessableEntity, |
|
|
@ -407,9 +406,6 @@ def put_user_ban(request: Request) -> Response: |
|
|
|
"""Ban a user.""" |
|
|
|
user = request.context |
|
|
|
|
|
|
|
if request.user == user: |
|
|
|
raise HTTPBadRequest("You cannot ban yourself") |
|
|
|
|
|
|
|
user.is_banned = True |
|
|
|
|
|
|
|
# delete all of the user's outstanding invite codes |
|
|
|