Address user directly in error messages
This commit is contained in:
parent
6fb576c8a6
commit
7b365a28c7
|
@ -100,7 +100,7 @@ def post_proposal_comments(proposal_id, comment, parent_comment_id):
|
||||||
|
|
||||||
# Make sure user is not silenced
|
# Make sure user is not silenced
|
||||||
if g.current_user.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
|
# Make the comment
|
||||||
comment = Comment(
|
comment = Comment(
|
||||||
|
|
|
@ -23,7 +23,7 @@ def get_authed_user():
|
||||||
|
|
||||||
def throw_on_banned(user):
|
def throw_on_banned(user):
|
||||||
if user.banned:
|
if user.banned:
|
||||||
raise AuthException("User is banned")
|
raise AuthException("You are banned")
|
||||||
|
|
||||||
|
|
||||||
def requires_auth(f):
|
def requires_auth(f):
|
||||||
|
|
Loading…
Reference in New Issue