mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-19 15:04:23 +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:
@@ -128,7 +128,7 @@ def private():
|
||||
@require_team_mode
|
||||
def public(team_id):
|
||||
errors = get_errors()
|
||||
team = Teams.query.filter_by(id=team_id).first_or_404()
|
||||
team = Teams.query.filter_by(id=team_id, banned=False, hidden=False).first_or_404()
|
||||
solves = team.get_solves()
|
||||
awards = team.get_awards()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user