From 4b2ce3b7a006e8afcde9a29e0cd638d94b35c0df Mon Sep 17 00:00:00 2001 From: justcool393 Date: Sun, 16 Oct 2022 03:41:54 -0700 Subject: [PATCH] use perms constant for unclub_post --- files/routes/posts.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index 324e4d23e9..4af04c7635 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -32,8 +32,6 @@ titleheaders = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWe @auth_required @feature_required('COUNTRY_CLUB') def club_post(pid, v): - - post = get_post(pid) if post.author_id != v.id and v.admin_level < PERMS['POST_COMMENT_MODERATION']: abort(403) @@ -58,10 +56,8 @@ def club_post(pid, v): @auth_required @feature_required('COUNTRY_CLUB') def unclub_post(pid, v): - - post = get_post(pid) - if post.author_id != v.id and v.admin_level < 2: abort(403) + if post.author_id != v.id and v.admin_level < PERMS['POST_COMMENT_MODERATION']: abort(403) if post.club: post.club = False