mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-19 06:54:20 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user