From 03bd9653ea6bb11aaf46a5eb4fe1a2c909980798 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 18 Feb 2023 01:26:38 +0200 Subject: [PATCH] disallow non-jannies from moving their posts to /h/changelog --- files/routes/reporting.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/routes/reporting.py b/files/routes/reporting.py index 21c2d4d5c..293f7edfd 100644 --- a/files/routes/reporting.py +++ b/files/routes/reporting.py @@ -155,6 +155,9 @@ def move_post(post:Submission, v:User, reason:str) -> Union[bool, str]: if post.author.exiled_from(sub_to): abort(403, f"User is exiled from this {HOLE_NAME}!") + if sub_to == 'changelog' and not v.admin_level >= PERMS['POST_TO_CHANGELOG']: + abort(403, "You don't have sufficient permissions to post in /h/changelog") + if sub_to in {'furry','vampire','racist','femboy'} and not v.client and not post.author.house.lower().startswith(sub_to): if v.id == post.author_id: abort(403, f"You need to be a member of House {sub_to.capitalize()} to post in /h/{sub_to}")