Properly hide users/teams if they are set to banned/hidden (#932)

* Properly hide users/teams if they are set to hidden/banned
    * This should be in the API and in the main user panel. This should not affect admins. 
* Update tests to reflect this behavior.
This commit is contained in:
Kevin Chung
2019-04-04 22:44:18 -04:00
committed by GitHub
parent 268ed85f60
commit 7c60c697ee
10 changed files with 181 additions and 12 deletions

View File

@@ -58,5 +58,5 @@ def private():
@check_account_visibility
@check_score_visibility
def public(user_id):
user = Users.query.filter_by(id=user_id).first_or_404()
user = Users.query.filter_by(id=user_id, banned=False, hidden=False).first_or_404()
return render_template('users/user.html', user=user)