bypass pin limit perm and also fix a shadowban perm

master
justcool393 2022-10-05 19:51:30 -07:00
parent d8610b34b6
commit 43f137208a
2 changed files with 2 additions and 1 deletions

View File

@ -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 = {

View File

@ -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(