forked from MarseyWorld/MarseyWorld
use perms constant for unclub_post
parent
4355768995
commit
4b2ce3b7a0
|
@ -32,8 +32,6 @@ titleheaders = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWe
|
||||||
@auth_required
|
@auth_required
|
||||||
@feature_required('COUNTRY_CLUB')
|
@feature_required('COUNTRY_CLUB')
|
||||||
def club_post(pid, v):
|
def club_post(pid, v):
|
||||||
|
|
||||||
|
|
||||||
post = get_post(pid)
|
post = get_post(pid)
|
||||||
if post.author_id != v.id and v.admin_level < PERMS['POST_COMMENT_MODERATION']: abort(403)
|
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
|
@auth_required
|
||||||
@feature_required('COUNTRY_CLUB')
|
@feature_required('COUNTRY_CLUB')
|
||||||
def unclub_post(pid, v):
|
def unclub_post(pid, v):
|
||||||
|
|
||||||
|
|
||||||
post = get_post(pid)
|
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:
|
if post.club:
|
||||||
post.club = False
|
post.club = False
|
||||||
|
|
Loading…
Reference in New Issue