From 23b421265d2dfc5e2a4f4f517e68a427d6a0264c Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 6 Aug 2024 20:33:35 +0300 Subject: [PATCH] allow JL2 to reply to deleted posts and comments --- files/routes/comments.py | 2 +- files/templates/comments.html | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 6e7e5cd81..76279053b 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -147,7 +147,7 @@ def comment(v): else: commenters_ping_post_id = None - if not isinstance(parent, User) and parent.deleted_utc != 0: + if not isinstance(parent, User) and parent.deleted_utc != 0 and v.admin_level < PERMS['POST_COMMENT_MODERATION']: if isinstance(parent, Post): abort(403, "You can't reply to deleted posts!") else: diff --git a/files/templates/comments.html b/files/templates/comments.html index cf51f0e0c..1a5079ac2 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -339,7 +339,7 @@ {% endif %} - {% if v and not c.deleted_utc %} + {% if v %} {% endif %} @@ -411,9 +411,7 @@ {% if v %} - {% if not c.deleted_utc %} - - {% endif %} +