From 649fc2414df38d6c498c7c0294c4ac2ab3a89d65 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 29 Oct 2022 00:14:59 +0200 Subject: [PATCH] disable adding admins on WPD --- files/helpers/const.py | 5 +++-- files/templates/userpage_admintools.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index 6403cb790..46cf9188a 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -159,7 +159,7 @@ LEADERBOARD_LIMIT = 25 ################################################################################ PERMS = { # Minimum admin_level to perform action. - 'ADMIN_ADD': 3, # note: explicitly disabled on rDrama + 'ADMIN_ADD': 3, 'ADMIN_REMOVE': 3, 'ADMIN_ADD_PERM_LEVEL': 2, # permission level given when user added via site 'ADMIN_ACTIONS_REVERT': 3, @@ -403,7 +403,7 @@ ANTISPAM_BYPASS_IDS = () if SITE == 'rdrama.net': FEATURES['PRONOUNS'] = True FEATURES['HOUSES'] = True - PERMS['ADMIN_ADD_PERM_LEVEL'] = 0 # extra check here to disallow adding admins on site + PERMS['ADMIN_ADD'] = 4 SIDEBAR_THREAD = 37696 BANNER_THREAD = 37697 @@ -486,6 +486,7 @@ elif SITE == 'watchpeopledie.tv': PERMS['HOLE_CREATE'] = 2 PERMS['POST_EDITING'] = 2 + PERMS['ADMIN_ADD'] = 4 SIDEBAR_THREAD = 5403 BANNER_THREAD = 9869 diff --git a/files/templates/userpage_admintools.html b/files/templates/userpage_admintools.html index 65982c2ed..e1544bb9b 100644 --- a/files/templates/userpage_admintools.html +++ b/files/templates/userpage_admintools.html @@ -22,7 +22,7 @@ {% macro userAdminToolsUpper(deviceType) %} {% if v and v.id != u.id and v.admin_level >= PERMS['USER_MODERATION_TOOLS_VISIBLE'] %} - {% if v.admin_level >= PERMS['ADMIN_ADD'] and SITE != 'rdrama.net' %} + {% if v.admin_level >= PERMS['ADMIN_ADD'] %} Make admin {% endif %} {% if v.admin_level >= PERMS['ADMIN_REMOVE'] %}