mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-04 08:22:10 +01:00 
			
		
		
		
	Team member don't have access to other people authorizations
This commit is contained in:
		@@ -101,11 +101,13 @@
 | 
			
		||||
            </dd>
 | 
			
		||||
        </dl>
 | 
			
		||||
 | 
			
		||||
        {% if user.registration.is_volunteer %}
 | 
			
		||||
        <div class="text-center">
 | 
			
		||||
            <a class="btn btn-info" href="{% url "participation:team_authorizations" pk=team.pk %}" data-turbolinks="false">
 | 
			
		||||
                <i class="fas fa-file-archive"></i> {% trans "Download all submitted authorizations" %}
 | 
			
		||||
            </a>
 | 
			
		||||
        </div>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="card-footer text-center">
 | 
			
		||||
        <button class="btn btn-primary" data-toggle="modal" data-target="#updateTeamModal">{% trans "Update" %}</button>
 | 
			
		||||
 
 | 
			
		||||
@@ -372,8 +372,7 @@ class TeamAuthorizationsView(LoginRequiredMixin, DetailView):
 | 
			
		||||
        user = request.user
 | 
			
		||||
        if not user.is_authenticated:
 | 
			
		||||
            return super().handle_no_permission()
 | 
			
		||||
        if user.registration.is_admin or user.registration.participates and user.registration.team.pk == kwargs["pk"] \
 | 
			
		||||
                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:
 | 
			
		||||
            return super().dispatch(request, *args, **kwargs)
 | 
			
		||||
        raise PermissionDenied
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user