From 97e675c707e966733defbc143801810e2e1d6b1d Mon Sep 17 00:00:00 2001 From: justcool393 Date: Thu, 15 Dec 2022 16:50:29 -0600 Subject: [PATCH 1/2] submissions: special posting sub logic by request --- files/routes/posts.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/routes/posts.py b/files/routes/posts.py index a660a8447..bac972ded 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -555,6 +555,9 @@ def submit_post(v:User, sub=None): if len(title_html) > POST_TITLE_HTML_LENGTH_LIMIT: return error("Rendered title is too big!") + if sub != "chudrama" and v.id == 253: # 2022-12-15: special logic by request + sub = "chudrama" + if sub == 'changelog' and not v.admin_level >= PERMS['POST_TO_CHANGELOG']: # we also allow 'code contributor' badgeholders to post to the changelog hole allowed = g.db.query(Badge.user_id).filter_by(badge_id=3).all() -- 2.34.1 From c5cc33345fde86a6a6383105757099e271ab6226 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Thu, 15 Dec 2022 16:53:23 -0600 Subject: [PATCH 2/2] submissions: restrict special case to rdrama.net --- files/routes/posts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index bac972ded..9b6f68903 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -555,7 +555,7 @@ def submit_post(v:User, sub=None): if len(title_html) > POST_TITLE_HTML_LENGTH_LIMIT: return error("Rendered title is too big!") - if sub != "chudrama" and v.id == 253: # 2022-12-15: special logic by request + if sub != "chudrama" and v.id == 253 and SITE == 'rdrama.net': # 2022-12-15: special logic by request sub = "chudrama" if sub == 'changelog' and not v.admin_level >= PERMS['POST_TO_CHANGELOG']: -- 2.34.1