diff options
author | Andrea Lepori <alepori@student.ethz.ch> | 2023-09-21 17:18:49 +0200 |
---|---|---|
committer | Andrea Lepori <alepori@student.ethz.ch> | 2023-09-21 17:18:49 +0200 |
commit | 0761f5dd51534425aaa6172134020d932e819377 (patch) | |
tree | c2cbee6a0bd7a56dd34283ae41497284284cf134 | |
parent | remove check for approved user (diff) | |
download | scout-subs-0761f5dd51534425aaa6172134020d932e819377.tar.gz scout-subs-0761f5dd51534425aaa6172134020d932e819377.zip |
check for files based on branca and not group
-rw-r--r-- | client/views.py | 1 | ||||
-rw-r--r-- | server/views.py | 3 | ||||
-rw-r--r-- | version.txt | 2 |
3 files changed, 2 insertions, 4 deletions
diff --git a/client/views.py b/client/views.py index b470f8d..4646843 100644 --- a/client/views.py +++ b/client/views.py @@ -125,7 +125,6 @@ def index(request): health_file = ["/server/media/", "/health_care_certificate/doc"] sign_doc_file = ["/server/media/", "/signed_doc/doc"] - print(docs) context = { "docs": docs, "no_docs": no_docs, 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:
diff --git a/version.txt b/version.txt index f4c1006..9d5757b 100644 --- a/version.txt +++ b/version.txt @@ -1,2 +1,2 @@ version=0.7 -rev=8 +rev=9 |