mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-25 19:02:33 +00:00
Juries can't download ZIP archives with authorizations
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
9734b51f53
commit
b40dce27df
@ -115,12 +115,14 @@
|
|||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
{% if user.registration.is_volunteer %}
|
{% if user.registration.is_volunteer %}
|
||||||
|
{% if user.registration in self.team.participation.tournament.organizers or user.registration.is_admin %}
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<a class="btn btn-info" href="{% url "participation:team_authorizations" pk=team.pk %}">
|
<a class="btn btn-info" href="{% url "participation:team_authorizations" pk=team.pk %}">
|
||||||
<i class="fas fa-file-archive"></i> {% trans "Download all submitted authorizations" %}
|
<i class="fas fa-file-archive"></i> {% trans "Download all submitted authorizations" %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer text-center">
|
<div class="card-footer text-center">
|
||||||
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#updateTeamModal">{% trans "Update" %}</button>
|
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#updateTeamModal">{% trans "Update" %}</button>
|
||||||
|
@ -392,9 +392,9 @@ class TeamAuthorizationsView(LoginRequiredMixin, DetailView):
|
|||||||
if not user.is_authenticated:
|
if not user.is_authenticated:
|
||||||
return super().handle_no_permission()
|
return super().handle_no_permission()
|
||||||
if user.registration.is_admin or user.registration.is_volunteer \
|
if user.registration.is_admin or user.registration.is_volunteer \
|
||||||
and (self.get_object().participation.tournament in user.registration.interesting_tournaments
|
and (user.registration in self.get_object().participation.tournament.organizers
|
||||||
or self.get_object().participation.final
|
or self.get_object().participation.final
|
||||||
and Tournament.final_tournament() in user.registration.interesting_tournaments):
|
and user.registration in Tournament.final_tournament().organizers):
|
||||||
return super().dispatch(request, *args, **kwargs)
|
return super().dispatch(request, *args, **kwargs)
|
||||||
raise PermissionDenied
|
raise PermissionDenied
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user