diff --git a/files/routes/comments.py b/files/routes/comments.py index 54bbc0202..21d68cfb6 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -196,7 +196,7 @@ def comment(v): file.save(oldname) image = process_image(oldname) if image == "": return {"error":"Image upload failed"}, 400 - if v.admin_level > PERMS['SITE_SETTINGS_SIDEBARS_BANNERS_BADGES'] and level == 1: + if v.admin_level >= PERMS['SITE_SETTINGS_SIDEBARS_BANNERS_BADGES'] and level == 1: if parent_post.id == SIDEBAR_THREAD: li = sorted(os.listdir(f'files/assets/images/{SITE_NAME}/sidebar'), key=lambda e: int(e.split('.webp')[0]))[-1] @@ -239,7 +239,7 @@ def comment(v): body = body.strip() - if v.admin_level > PERMS['SITE_SETTINGS_SNAPPY_QUOTES'] and parent_post.id == SNAPPY_THREAD and level == 1: + if v.admin_level >= PERMS['SITE_SETTINGS_SNAPPY_QUOTES'] and parent_post.id == SNAPPY_THREAD and level == 1: with open(f"snappy_{SITE_NAME}.txt", "a", encoding="utf-8") as f: f.write('\n{[para]}\n' + body) diff --git a/files/routes/posts.py b/files/routes/posts.py index 44d399935..014a1ae54 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -842,7 +842,7 @@ def submit_post(v, sub=None): if len(url) > 2048: return error("There's a 2048 character limit for URLs.") - if v and v.admin_level > PERMS['POST_BETS']: + if v and v.admin_level >= PERMS['POST_BETS']: bets = [] for i in bet_regex.finditer(body): bets.append(i.group(1)) @@ -929,7 +929,7 @@ def submit_post(v, sub=None): ) g.db.add(choice) - if v and v.admin_level > PERMS['POST_BETS']: + if v and v.admin_level >= PERMS['POST_BETS']: for bet in bets: bet = SubmissionOption( submission_id=post.id,