From 9efa29819183a7cabbd56519150ee108f68b7efc Mon Sep 17 00:00:00 2001
From: "J.-S. Caux" <J.S.Caux@uva.nl>
Date: Sat, 10 Jun 2017 15:41:01 +0200
Subject: [PATCH] Fix bug where EIC didn't see referee identity when vetting
 report

---
 submissions/managers.py                                         | 2 +-
 .../submissions/_single_public_report_without_comments.html     | 2 +-
 submissions/templates/submissions/vet_submitted_reports.html    | 2 +-
 submissions/views.py                                            | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/submissions/managers.py b/submissions/managers.py
index 0b9d6cd8c..7e8a148b3 100644
--- a/submissions/managers.py
+++ b/submissions/managers.py
@@ -27,7 +27,7 @@ class SubmissionManager(models.Manager):
 
     def user_filter(self, user):
         """
-        Prevent conflic of interest by filtering submissions possible related to user.
+        Prevent conflict of interest by filtering submissions possibly related to user.
         This filter should be inherited by other filters.
         """
         try:
diff --git a/submissions/templates/submissions/_single_public_report_without_comments.html b/submissions/templates/submissions/_single_public_report_without_comments.html
index c983cd7ac..bad492424 100644
--- a/submissions/templates/submissions/_single_public_report_without_comments.html
+++ b/submissions/templates/submissions/_single_public_report_without_comments.html
@@ -4,7 +4,7 @@
 <div class="row">
     <div class="col-12">
         <div class="report">
-            {% if user.contributor == submission.editor_in_charge or user|is_in_group:'Editorial Administrators'  and not is_author or user|is_in_group:'Editorial Administrators' and not is_author_unchecked %}
+            {% if user.contributor == submission.editor_in_charge or user|is_in_group:'Editorial Administrators' and user|is_not_author_of_submission:submission.arxiv_identifier_w_vn_nr %}
 
                 <div class="reportid">
                     <h3>{% if report.anonymous %}(chose public anonymity) {% endif %}<a href="{% url 'scipost:contributor_info' report.author.id %}">{{ report.author.user.first_name }} {{ report.author.user.last_name }}</a>
diff --git a/submissions/templates/submissions/vet_submitted_reports.html b/submissions/templates/submissions/vet_submitted_reports.html
index eb2278ad8..e37d0cc28 100644
--- a/submissions/templates/submissions/vet_submitted_reports.html
+++ b/submissions/templates/submissions/vet_submitted_reports.html
@@ -46,7 +46,7 @@ $(document).ready(function(){
 
             <h2 class="mb-2">Report to vet:</h2>
 
-            {% include 'submissions/_single_public_report_without_comments.html' with report=report_to_vet %}
+            {% include 'submissions/_single_public_report_without_comments.html' with submission=report_to_vet.submission report=report_to_vet %}
 
             <hr class="small">
             <h2>Please vet this Report:</h2>
diff --git a/submissions/views.py b/submissions/views.py
index 50299dd78..6d5cdc5d5 100644
--- a/submissions/views.py
+++ b/submissions/views.py
@@ -1067,7 +1067,7 @@ def submit_report(request, arxiv_identifier_w_vn_nr):
 @permission_required('scipost.can_take_charge_of_submissions', raise_exception=True)
 def vet_submitted_reports(request):
     """
-    Reports with status `unvetted` will be shown one-by-one. An user may only
+    Reports with status `unvetted` will be shown one-by-one. A user may only
     vet reports of submissions he/she is EIC of.
 
     After vetting an email is sent to the report author, bcc EIC. If report
-- 
GitLab