forked from MarseyWorld/MarseyWorld
add post bypass checking perm
parent
c78579ec5a
commit
360cff7e8f
|
@ -170,6 +170,7 @@ PERMS = { # Minimum admin_level to perform action.
|
||||||
'POST_COMMENT_MODERATION': 2,
|
'POST_COMMENT_MODERATION': 2,
|
||||||
'POST_COMMENT_DISTINGUISH': 1,
|
'POST_COMMENT_DISTINGUISH': 1,
|
||||||
'POST_COMMENT_MODERATION_TOOLS_VISIBLE': 2, # note: does not affect API at all
|
'POST_COMMENT_MODERATION_TOOLS_VISIBLE': 2, # note: does not affect API at all
|
||||||
|
'POST_BYPASS_REPOST_CHECKING': 1,
|
||||||
'POST_EDITING': 3,
|
'POST_EDITING': 3,
|
||||||
'USER_BADGES': 2,
|
'USER_BADGES': 2,
|
||||||
'USER_BAN': 2,
|
'USER_BAN': 2,
|
||||||
|
|
|
@ -785,7 +785,7 @@ def submit_post(v, sub=None):
|
||||||
Submission.deleted_utc == 0,
|
Submission.deleted_utc == 0,
|
||||||
Submission.is_banned == False
|
Submission.is_banned == False
|
||||||
).first()
|
).first()
|
||||||
if repost and FEATURES['REPOST_DETECTION'] and not v.admin_level:
|
if repost and FEATURES['REPOST_DETECTION'] and not v.admin_level >= PERMS['POST_BYPASS_REPOST_CHECKING']:
|
||||||
return redirect(repost.permalink)
|
return redirect(repost.permalink)
|
||||||
|
|
||||||
domain_obj = get_domain(domain)
|
domain_obj = get_domain(domain)
|
||||||
|
|
Loading…
Reference in New Issue