Address user directly in error messages

This commit is contained in:
Daniel Ternyak 2019-02-15 13:09:51 -06:00
parent 6fb576c8a6
commit 7b365a28c7
No known key found for this signature in database
GPG Key ID: DF212D2DC5D0E245
2 changed files with 2 additions and 2 deletions

View File

@ -100,7 +100,7 @@ def post_proposal_comments(proposal_id, comment, parent_comment_id):
# Make sure user is not silenced
if g.current_user.silenced:
return {"message": "User is silenced, cannot comment"}, 403
return {"message": "Your account has been silenced, commenting is disabled."}, 403
# Make the comment
comment = Comment(

View File

@ -23,7 +23,7 @@ def get_authed_user():
def throw_on_banned(user):
if user.banned:
raise AuthException("User is banned")
raise AuthException("You are banned")
def requires_auth(f):