From 043658b8e0346541ecfe7f2342a2fe20d4db4004 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 12 Sep 2021 03:57:48 +0200 Subject: [PATCH] gh --- files/routes/comments.py | 3 +++ files/templates/default.html | 2 +- files/templates/formatting.html | 2 +- files/templates/login.html | 2 +- files/templates/settings.html | 2 +- files/templates/settings2.html | 2 +- files/templates/sign_up.html | 2 +- files/templates/sign_up_failed_ref.html | 2 +- files/templates/submit.html | 2 +- 9 files changed, 11 insertions(+), 8 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 42d130a9a..76db76bb3 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -41,6 +41,8 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None): comment = get_comment(cid, v=v) + if comment.post and comment.post.club and not (v and v.coins > 150): abort(403) + if not comment.parent_submission and not (v and (comment.author.id == v.id or comment.sentto == v.id)) and not (v and v.admin_level == 6) : abort(403) if not pid: @@ -137,6 +139,7 @@ def api_comment(v): parent_id = parent_fullname.split("_")[1] if parent_fullname.startswith("t2"): parent_post = get_post(parent_id, v=v) + if parent_post.club and not (v and v.coins > 150): abort(403) parent = parent_post parent_comment_id = None level = 1 diff --git a/files/templates/default.html b/files/templates/default.html index 926224e91..fec23f10e 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -1251,7 +1251,7 @@ {% include "expanded_image_modal.html" %} - + diff --git a/files/templates/formatting.html b/files/templates/formatting.html index f69dfa634..b5819abba 100644 --- a/files/templates/formatting.html +++ b/files/templates/formatting.html @@ -144,6 +144,6 @@ We also have some custom hooks for mentioning users and subreddits. Note that th {% include "expanded_image_modal.html" %} - + {% endblock %} diff --git a/files/templates/login.html b/files/templates/login.html index 08c87091f..79b103ac9 100644 --- a/files/templates/login.html +++ b/files/templates/login.html @@ -130,7 +130,7 @@ {% include "bootstrap.html" %} - + diff --git a/files/templates/settings.html b/files/templates/settings.html index 2dd8847ce..2d52bbb6b 100644 --- a/files/templates/settings.html +++ b/files/templates/settings.html @@ -254,7 +254,7 @@ - + {% block onload %}{% endblock %} diff --git a/files/templates/settings2.html b/files/templates/settings2.html index 30d241e41..8487108ab 100644 --- a/files/templates/settings2.html +++ b/files/templates/settings2.html @@ -226,7 +226,7 @@ }); - + {% block scripts %} {% endblock %} diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html index da3c3c527..a81f8eb5a 100644 --- a/files/templates/sign_up.html +++ b/files/templates/sign_up.html @@ -233,7 +233,7 @@ - + diff --git a/files/templates/sign_up_failed_ref.html b/files/templates/sign_up_failed_ref.html index da8222564..88ba525d0 100644 --- a/files/templates/sign_up_failed_ref.html +++ b/files/templates/sign_up_failed_ref.html @@ -144,7 +144,7 @@ - + diff --git a/files/templates/submit.html b/files/templates/submit.html index d53f12a44..969400cd6 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -489,7 +489,7 @@ - +