mirror of https://gitlab.crans.org/bde/nk20
Superusers can see their note even if they have no membership for local dev
This commit is contained in:
parent
a1dc8fe530
commit
c090b4af76
|
@ -141,7 +141,10 @@ class UserDetailView(ProtectQuerysetMixin, LoginRequiredMixin, DetailView):
|
|||
"""
|
||||
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):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue