def tournament_admin_authorization(request, pk, format=None): return ta.has_tournament_authorization(True, pk, request)
def fight_authorization(request, pk, format=None): fight = ippon.models.fight.Fight.objects.get(pk=pk) return ta.has_tournament_authorization([True, False], fight.team_fight.tournament.id, request)
def tournament_staff_authorization(request, pk, format=None): return ta.has_tournament_authorization([True, False], pk, request)
def team_fight_authorization(request, pk, format=None): team_fight = tfm.TeamFight.objects.get(pk=pk) return ta.has_tournament_authorization([True, False], team_fight.tournament.id, request)
def group_authorization(request, pk, format=None): group = get_object_or_404(gm.Group.objects.all(), pk=pk) return ta.has_tournament_authorization([True, False], group.group_phase.tournament.id, request)
def cup_phase_authorization(request, pk, format=None): cup_phase = get_object_or_404(cpm.CupPhase.objects.all(), pk=pk) return ta.has_tournament_authorization([True, False], cup_phase.tournament.id, request)
def team_authorization(request, pk, format=None): team = get_object_or_404(tem.Team.objects.all(), pk=pk) return ta.has_tournament_authorization([True, False], team.tournament.id, request)