From 2e729396736053c635c8357cf4ce62efc5b5a53d Mon Sep 17 00:00:00 2001 From: Ola Tarkowska Date: Thu, 26 Apr 2018 14:01:51 +0100 Subject: [PATCH] fix permission on downloads --- emgapi/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emgapi/models.py b/emgapi/models.py index 4f37fe851..46713df88 100644 --- a/emgapi/models.py +++ b/emgapi/models.py @@ -87,7 +87,8 @@ def available(self, request=None): _query_filters['StudyQuerySet']['authenticated'] = \ [Q(submission_account_id=_username) | Q(is_public=1)] _query_filters['StudyDownloadQuerySet']['authenticated'] = \ - [Q(submission_account_id=_username) | Q(study__is_public=1)] + [Q(study__submission_account_id=_username) | + Q(study__is_public=1)] _query_filters['SampleQuerySet']['authenticated'] = \ [Q(submission_account_id=_username) | Q(is_public=1)] _query_filters['RunQuerySet']['authenticated'] = \