From c76bfa5ffc623663722599dd7ae8b777edf3fc85 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 8 Nov 2022 11:41:16 +0200 Subject: [PATCH] fix 3 permapin limit not working --- files/helpers/const.py | 1 - files/routes/admin.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index a3c0a5fc9..97753b530 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -225,7 +225,6 @@ PERMS = { # Minimum admin_level to perform action. 'POST_TO_POLL_THREAD': 2, 'POST_BETS': 3, 'POST_BETS_DISTRIBUTE': 3, # probably should be the same as POST_BETS but w/e - 'BYPASS_PIN_LIMIT_IF_TEMPORARY': 2, 'VIEW_PENDING_SUBMITTED_MARSEYS': 3, 'VIEW_PENDING_SUBMITTED_HATS': 3, 'MODERATE_PENDING_SUBMITTED_MARSEYS': 3, # note: there is an extra check so that only """carp""" can approve them diff --git a/files/routes/admin.py b/files/routes/admin.py index 4fd3646d7..3d4799770 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1225,7 +1225,7 @@ def sticky_post(post_id, v): extra_pin_slots = 1 if post.stickied else 0 sticky_time = int(time.time()) + 3600 if not post.stickied else None - if pins >= PIN_LIMIT + extra_pin_slots and v.admin_level < PERMS['BYPASS_PIN_LIMIT_IF_TEMPORARY'] and not sticky_time: + if pins >= PIN_LIMIT + extra_pin_slots and not sticky_time: abort(403, f"Can't exceed {PIN_LIMIT} pinned posts limit!") if not post.stickied_utc: