Ajout du joueur responsable
CI - Security, Lint & Tests / validate (push) Canceled after 0s

This commit is contained in:
cedrick2711
2026-09-27 14:25:29 -04:00
parent bd9ed4bdc7
commit 2e5903b131
18 changed files with 795 additions and 14 deletions
+3
View File
@@ -29,6 +29,9 @@ class Admin(User):
def can_manage_this_org_team(self, org_team):
return True
def can_designate_team_representative(self):
return True
def get_visible_tryouts(self):
from app.models.tryout.tryout import Tryout
+15
View File
@@ -103,5 +103,20 @@ class User(UserMixin, db.Model):
def can_manage_this_org_team(self, org_team):
return False
def can_manage_team_matches(self, org_team):
"""Whether the user may manage this team's matches and practices.
Broader than :meth:`can_manage_this_org_team`: a player named as the
team's responsible joins whoever administers it. The rule itself
lives in ``app.permissions``.
"""
from app.permissions import can_manage_team_matches
return can_manage_team_matches(self, org_team)
def can_designate_team_representative(self):
"""Whether the user may name a team's responsible. President only."""
return False
def get_visible_tryouts(self):
return []