mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-04 16:02:26 +01:00 
			
		
		
		
	Fix permission to view user detail
This commit is contained in:
		@@ -242,7 +242,7 @@ class UserDetailView(LoginRequiredMixin, DetailView):
 | 
			
		||||
        user = self.get_object()
 | 
			
		||||
        if user == me or me.registration.is_admin or me.registration.is_volunteer \
 | 
			
		||||
                and user.registration.participates and user.registration.team \
 | 
			
		||||
                and user.registration.team.participation.tournament in user.registration.organized_tournaments.all() \
 | 
			
		||||
                and user.registration.team.participation.tournament in me.registration.organized_tournaments.all() \
 | 
			
		||||
                or user.registration.is_volunteer and me.registration.is_volunteer \
 | 
			
		||||
                and me.registration.interesting_tournaments.intersection(user.registration.intersting_tournaments):
 | 
			
		||||
            return super().dispatch(request, *args, **kwargs)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user