From 8d57a983cde24ae0a9b7f6687d8b72d46819ff23 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 4 Mar 2023 23:50:19 +0200 Subject: [PATCH] do this https://stupidpol.site/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/3708981#context --- files/routes/comments.py | 3 +++ files/templates/megathread_index.html | 20 +++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 94facb84d..f50f98477 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -122,6 +122,9 @@ def comment(v:User): parent_user = parent if isinstance(parent, User) else parent.author posting_to_submission = isinstance(post_target, Submission) + if posting_to_submission and post_target.id in ADMIGGER_THREADS and not v.admin_level: + abort(403, "You can't post in this thread!") + if not User.can_see(v, parent): abort(403) if not isinstance(parent, User) and parent.deleted_utc != 0: if isinstance(parent, Submission): diff --git a/files/templates/megathread_index.html b/files/templates/megathread_index.html index 481c6214b..40f718ed5 100644 --- a/files/templates/megathread_index.html +++ b/files/templates/megathread_index.html @@ -72,7 +72,25 @@ 'Submit a design to be added to our redbubble shop.', 'fa-shirt', '#777777', '/post/110669', - ) + ), + ( + 'View All Sidebar Pictures', + '', + 'fa-sidebar', '#f5fffa', + '/post/37696', + ), + ( + 'View All Banner Pictures', + '', + 'fa-panorama', '#87cefa', + '/post/37697', + ), + ( + 'View All Snappy Quotes', + '', + 'fa-robot', '#adff2f', + '/post/37749', + ), ])-%} {%- endif -%}