From 3e472c74e095b1b79417154d1d4f01874619b903 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 29 May 2022 20:36:51 +0200 Subject: [PATCH] Removed "make admin" on rdrama.net --- files/routes/admin.py | 2 ++ files/templates/userpage.html | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 4cdf68c4d..1920bd496 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -182,6 +182,8 @@ if SITE_NAME == 'PCM': @app.post("/@/make_admin") @admin_level_required(3) def make_admin(v, username): + if SITE == 'rdrama.net': abort(403) + user = get_user(username) if not user: abort(404) user.admin_level = 2 diff --git a/files/templates/userpage.html b/files/templates/userpage.html index 0a3d61ee1..ea886ccff 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -180,7 +180,9 @@ {% endif %} {% if v.admin_level > 2 %} - Make admin + {% if SITE != 'rdrama.net' %} + Make admin + {% endif %} Remove admin @@ -486,8 +488,10 @@ Gift Marseybux {% endif %} - {% if v.admin_level > 2 %} - Make admin + {% if v.admin_level > 2 %} + {% if SITE != 'rdrama.net' %} + Make admin + {% endif %} Remove admin