Correction des présences et correction de plusieurs erreurs mineur de déplacement/parcours de l'utilisateur, harmonisation des processus

This commit is contained in:
cedrick2711
2026-07-28 18:11:02 -04:00
parent b982cd0318
commit a0f18a886c
19 changed files with 250 additions and 116 deletions
+3 -3
View File
@@ -20,7 +20,7 @@ def can_manage_team_match(team):
Returns:
bool: True if user is president, manager, or a coach of this team.
"""
if current_user.role in ['president']:
if current_user.role in ['admin']:
return True
if current_user.role == 'manager':
return True
@@ -45,7 +45,7 @@ def list_matches():
# Optional pre-filter by team_id from query param
filter_team_id = request.args.get('team_id', type=int)
if current_user.role == 'president':
if current_user.role == 'admin':
teams = OrgTeam.query.order_by(OrgTeam.name).all()
matches_query = TeamMatch.query
elif current_user.role == 'manager':
@@ -337,7 +337,7 @@ def api_manageable_teams():
if not current_user.can_schedule_matches():
return jsonify([])
if current_user.role in ['president', 'manager']:
if current_user.role in ['admin', 'manager']:
teams = OrgTeam.query.order_by(OrgTeam.name).all()
elif current_user.role == 'coach':
teams = OrgTeam.query.filter(