mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 01:12:08 +01:00 
			
		
		
		
	Superusers can see their note even if they have no membership for local dev
This commit is contained in:
		@@ -141,7 +141,10 @@ class UserDetailView(ProtectQuerysetMixin, LoginRequiredMixin, DetailView):
 | 
				
			|||||||
        """
 | 
					        """
 | 
				
			||||||
        We can't display information of a not registered user.
 | 
					        We can't display information of a not registered user.
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        return super().get_queryset().filter(profile__registration_valid=True)
 | 
					        qs = super().get_queryset()
 | 
				
			||||||
 | 
					        if self.request.user.is_superuser and self.request.session.get("permission_mask", -1) >= 42:
 | 
				
			||||||
 | 
					            return qs
 | 
				
			||||||
 | 
					        return qs.filter(profile__registration_valid=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def get_context_data(self, **kwargs):
 | 
					    def get_context_data(self, **kwargs):
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user