From 43f137208a3daa480da3260da3747d6a1024d353 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Wed, 5 Oct 2022 19:51:30 -0700 Subject: [PATCH] bypass pin limit perm and also fix a shadowban perm --- files/helpers/const.py | 1 + files/routes/posts.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index 9fac66ec8..a9e77d430 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -133,6 +133,7 @@ PERMS = { # Minimum admin_level to perform action. 'USER_BAN': 2, 'USER_SHADOWBAN': 2, 'POST_TO_CHANGELOG': 1, + 'BYPASS_PIN_LIMIT': 3, } FEATURES = { diff --git a/files/routes/posts.py b/files/routes/posts.py index 7be3690c3..4ea80600a 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -253,7 +253,7 @@ def viewmore(v, pid, sort, offset): blocked.c.target_id, ).filter(Comment.parent_submission == pid, Comment.stickied == None, Comment.id.notin_(ids), Comment.level < 10) - if not (v and v.shadowbanned) and not (v and v.admin_level >= 2): + if not (v and v.shadowbanned) and not (v and v.admin_level >= PERMS['USER_SHADOWBAN']): comments = comments.join(Comment.author).filter(User.shadowbanned == None) comments=comments.join(