From 2b51b13dcce9b7366f4375fc0908cf26ecc5f4c1 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Thu, 6 Oct 2022 02:37:41 -0700 Subject: [PATCH] user moderation tools visible permission --- files/helpers/const.py | 3 ++- files/templates/userpage.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index 8bdbddc96..274817246 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -137,7 +137,7 @@ PERMS = { # Minimum admin_level to perform action. 'USER_VOTERS_VISIBLE': 0, 'POST_COMMENT_MODERATION': 2, 'POST_COMMENT_DISTINGUISH': 1, - 'POST_COMMENT_MODERATION_TOOLS_VISIBLE': 2, + 'POST_COMMENT_MODERATION_TOOLS_VISIBLE': 2, # note: does not affect API at all 'POST_EDITING': 3, 'USER_BADGES': 2, 'USER_BAN': 2, @@ -147,6 +147,7 @@ PERMS = { # Minimum admin_level to perform action. 'USER_LINK': 2, 'USER_MERGE': 3, # note: extra check for Aevann 'USER_TITLE_CHANGE': 2, + 'USER_MODERATION_TOOLS_VISIBLE': 2, # note: does not affect API at all 'POST_TO_CHANGELOG': 1, # note: code contributors can also post to changelog 'POST_TO_POLL_THREAD': 2, 'POST_BETS': 3, diff --git a/files/templates/userpage.html b/files/templates/userpage.html index da0c5a58c..f34c39b59 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -638,7 +638,7 @@ - {% if v and v.admin_level >= PERMS['ADMIN_HOME_VISIBLE'] %} + {% if v and v.admin_level >= PERMS['USER_MODERATION_TOOLS_VISIBLE'] %} {% if FEATURES['COUNTRY_CLUB'] and v.admin_level >= PERMS['USER_CLUB_ALLOW_BAN'] -%}