From 27b6055d6e7518ec0e745ecb8ed11f7c895c43cc Mon Sep 17 00:00:00 2001 From: TLSM Date: Sat, 18 Jun 2022 18:24:59 -0400 Subject: [PATCH] Exclude JL3 from edit_post limit (megathreads &c). --- files/routes/posts.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index e9d916b3b..6e77e4e63 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -440,10 +440,11 @@ def morecomments(v, cid): def edit_post(pid, v): p = get_post(pid) - if time.time() - p.created_utc > 7*24*60*60: - return {"error":"You can't edit posts older than 1 week!"}, 403 - - if p.author_id != v.id and not (v.admin_level > 1 and v.admin_level > 2): abort(403) + if not v.admin_level >= 3: + if time.time() - p.created_utc > 7*24*60*60: + return {"error":"You can't edit posts older than 1 week!"}, 403 + elif p.author_id != v.id: + abort(403) title = request.values.get("title", "").strip().replace('‎','')