remotes/1693176582716663532/tmp_refs/heads/watchparty
justcool393 2022-10-05 19:51:44 -07:00
parent 43f137208a
commit ae0c215af3
2 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ def get_account(id, v=None, graceful=False, include_blocks=False, include_shadow
user = g.db.get(User, id)
if not user or (user.shadowbanned and not (include_shadowbanned or (v and (v.admin_level >= 2 or v.shadowbanned)))):
if not user or (user.shadowbanned and not (include_shadowbanned or (v and (v.admin_level >= PERMS['USER_SHADOWBAN'] or v.shadowbanned)))):
if not graceful: abort(404)
else: return None

View File

@ -1212,7 +1212,7 @@ def sticky_post(post_id, v):
if not post.stickied:
pins = g.db.query(Submission).filter(Submission.stickied != None, Submission.is_banned == False).count()
if pins >= PIN_LIMIT:
if v.admin_level > 2:
if v.admin_level > PERMS['BYPASS_PIN_LIMIT']:
post.stickied = v.username
post.stickied_utc = int(time.time()) + 3600
else: return {"error": f"Can't exceed {PIN_LIMIT} pinned posts limit!"}, 403