mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 17:18:24 +02:00
Fix permission to see solutions when they are available
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -837,7 +837,8 @@ class SolutionView(LoginRequiredMixin, View):
|
||||
or user.registration.participates and user.registration.team
|
||||
and (solution.participation.team == user.registration.team or
|
||||
any(passage.pool.round == 1
|
||||
or timezone.now() >= passage.pool.tournament.solutions_available_second_phase
|
||||
or (passage.pool.round == 2 and passage.pool.tournament.solutions_available_second_phase)
|
||||
or (passage.pool.round == 3 and passage.pool.tournament.solutions_available_third_phase)
|
||||
for passage in passage_participant_qs.all()))):
|
||||
raise PermissionDenied
|
||||
# Guess mime type of the file
|
||||
|
Reference in New Issue
Block a user