From 8a8b1d18984c5c60119353a8ee9a7a2869c02ffd Mon Sep 17 00:00:00 2001 From: George Katsikas <giorgakis.katsikas@gmail.com> Date: Fri, 19 Jul 2024 15:57:15 +0300 Subject: [PATCH] allow edadmin to access all plagiarism reports fixes #194 --- scipost_django/submissions/views/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scipost_django/submissions/views/__init__.py b/scipost_django/submissions/views/__init__.py index 8b095538c..11d0fbf32 100644 --- a/scipost_django/submissions/views/__init__.py +++ b/scipost_django/submissions/views/__init__.py @@ -3268,6 +3268,13 @@ class PlagiarismReportPDFView( permission_required = "scipost.can_do_plagiarism_checks" editorial_page = True + # Reset queryset to all submissions (if user is edadmin) + def get_queryset(self): + if is_edadmin(self.request.user): + return Submission.objects.all() + else: + return super().get_queryset() + def get_redirect_url(self, *args, **kwargs): """Get the temporary url provided by the iThenticate API.""" submission = self.get_object() -- GitLab