From 0761f5dd51534425aaa6172134020d932e819377 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Thu, 21 Sep 2023 17:18:49 +0200 Subject: check for files based on branca and not group --- server/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'server') diff --git a/server/views.py b/server/views.py index 79ab72f..49d88f3 100644 --- a/server/views.py +++ b/server/views.py @@ -2017,8 +2017,7 @@ def media_request(request, id=0, t="", flag=""): usercode = UserCode.objects.get(id=id) if request.user.is_staff: groups = getGroups(request) - usercode_group = list(usercode.user.groups.all())[0] - if usercode_group not in groups: + if usercode.branca not in groups: return else: if usercode.user != request.user: -- cgit v1.2.1