From c160f1284902a8e975a717bf391a94d0010e0ca6 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Thu, 23 Sep 2021 11:20:28 +0200 Subject: fix ulist only of same group --- server/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server') diff --git a/server/views.py b/server/views.py index 7d045bb..94e6e90 100644 --- a/server/views.py +++ b/server/views.py @@ -279,7 +279,7 @@ def ulist(request): # list users with their documents permission = Permission.objects.get(codename="approved") - usercodes = UserCode.objects.filter(Q(user__user_permissions=permission) | Q(user__is_staff=True)).select_related("user", "medic").order_by("user__last_name") + usercodes = UserCode.objects.filter(Q(user__user_permissions=permission) | Q(user__is_staff=True)).filter(user__groups__name__contains=parent_group).select_related("user", "medic").order_by("user__last_name") vac_file = ["/server/media/", "/vac_certificate/usercode"] health_file = ["/server/media/", "/health_care_certificate/usercode"] -- cgit v1.2.1