Fix permission to access passage detail for an observer team
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
8b3f3af2b9
commit
44302a9ff4
|
@ -1931,7 +1931,7 @@ class PassageDetailView(LoginRequiredMixin, DetailView):
|
||||||
or reg in passage.pool.juries.all()
|
or reg in passage.pool.juries.all()
|
||||||
or reg.pools_presided.filter(tournament=passage.pool.tournament).exists()) \
|
or reg.pools_presided.filter(tournament=passage.pool.tournament).exists()) \
|
||||||
or reg.participates and reg.team \
|
or reg.participates and reg.team \
|
||||||
and reg.team.participation in [passage.defender, passage.opponent, passage.reviewer]:
|
and reg.team.participation in [passage.defender, passage.opponent, passage.reviewer, passage.observer]:
|
||||||
return super().dispatch(request, *args, **kwargs)
|
return super().dispatch(request, *args, **kwargs)
|
||||||
return self.handle_no_permission()
|
return self.handle_no_permission()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue