From 2220856e5d3b2184220b7225385d3b1930b0e7b7 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Tue, 24 Apr 2018 10:33:50 +0200 Subject: [PATCH] Changed mediafile protection logic (closes #3707) --- openslides/mediafiles/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openslides/mediafiles/views.py b/openslides/mediafiles/views.py index 430aa400c..1a17862d68 100644 --- a/openslides/mediafiles/views.py +++ b/openslides/mediafiles/views.py @@ -81,7 +81,7 @@ def protected_serve(request, path, document_root=None, show_indexes=False): is_special_file = mediafile.is_logo() or mediafile.is_font() is_hidden_but_no_perms = mediafile.hidden and not has_perm(request.user, 'mediafiles.can_see_hidden') - if not can_see or (is_hidden_but_no_perms and not is_special_file): + if not is_special_file and (not can_see or is_hidden_but_no_perms): return HttpResponseForbidden(content="Forbidden.") else: return serve(request, path, document_root, show_indexes)