From bf1a873437134b33459fd1aed7710f71c76e952d Mon Sep 17 00:00:00 2001 From: Jorran de Wit <jorrandewit@outlook.com> Date: Sun, 23 Jul 2017 21:12:41 +0200 Subject: [PATCH] Remove deadlink for non-authenticated users --- comments/templates/comments/reply_to_report.html | 2 +- partners/managers.py | 1 - .../templates/submissions/_single_public_report.html | 6 ++++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/comments/templates/comments/reply_to_report.html b/comments/templates/comments/reply_to_report.html index 348d82701..d796bb121 100644 --- a/comments/templates/comments/reply_to_report.html +++ b/comments/templates/comments/reply_to_report.html @@ -14,7 +14,7 @@ <div class="row"> <div class="col-12"> {% if not is_author %} - <h2>(you are not identified as an author of this Submission; if you are, you can claim authorship on your Personal Page)</h2> + <h2>You are not identified as an author of this Submission; if you are, you can claim authorship on your Personal Page.</h2> {% else %} <h2>The Submission concerned:</h2> diff --git a/partners/managers.py b/partners/managers.py index 2b3e4b390..d542b1385 100644 --- a/partners/managers.py +++ b/partners/managers.py @@ -1,5 +1,4 @@ from django.db import models -from django.db.models import F from django.utils import timezone from .constants import MEMBERSHIP_SUBMITTED, PROSPECTIVE_PARTNER_PROCESSED, REQUEST_INITIATED diff --git a/submissions/templates/submissions/_single_public_report.html b/submissions/templates/submissions/_single_public_report.html index a73393656..cc4b233b4 100644 --- a/submissions/templates/submissions/_single_public_report.html +++ b/submissions/templates/submissions/_single_public_report.html @@ -1,8 +1,10 @@ {% extends 'submissions/_single_public_report_without_comments.html' %} {% block single_report_footer %} - <hr class="small"> - <h3><a href="{% url 'comments:reply_to_report' report_id=report.id %}">Reply to this Report</a> (authors only)</h3> + {% if user.is_authenticated and perms.scipost.can_submit_comments %} + <hr class="small"> + <h3><a href="{% url 'comments:reply_to_report' report_id=report.id %}">Reply to this Report</a> (authors only)</h3> + {% endif %} {% for reply in report.comment_set.vetted %} {% include 'comments/_single_comment_with_link.html' with comment=reply perms=perms user=user %} -- GitLab