aboutsummaryrefslogtreecommitdiffstats
path: root/server/views.py
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2023-09-21 17:18:49 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2023-09-21 17:18:49 +0200
commit0761f5dd51534425aaa6172134020d932e819377 (patch)
treec2cbee6a0bd7a56dd34283ae41497284284cf134 /server/views.py
parentremove check for approved user (diff)
downloadscout-subs-0761f5dd51534425aaa6172134020d932e819377.tar.gz
scout-subs-0761f5dd51534425aaa6172134020d932e819377.zip
check for files based on branca and not group
Diffstat (limited to 'server/views.py')
-rw-r--r--server/views.py3
1 files changed, 1 insertions, 2 deletions
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: