From 35b1532bb4d7ec4f0210fdaca7541687e2ee49dc Mon Sep 17 00:00:00 2001 From: justcool393 Date: Fri, 25 Nov 2022 19:15:39 -0600 Subject: [PATCH] admin: remove meme admin vestige --- files/helpers/const.py | 1 - files/routes/static.py | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index 6cc91acca..831a95db4 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -253,7 +253,6 @@ PERMS = { # Minimum admin_level to perform action. 'VIEW_PRIVATE_PROFILES': 2, 'VIEW_ALTS': 2, 'VIEW_PROFILE_VIEWS': 2, - 'VIEW_SORTED_ADMIN_LIST': 3, 'VIEW_ACTIVE_USERS': 2, 'VIEW_ALL_USERS': 2, 'VIEW_ALT_VOTES': 2, diff --git a/files/routes/static.py b/files/routes/static.py index be1e81ce5..1601ba3e7 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -116,13 +116,9 @@ def patrons(v): @app.get("/badmins") @auth_required def admins(v): - if v.admin_level >= PERMS['VIEW_SORTED_ADMIN_LIST']: - admins = g.db.query(User).filter(User.admin_level>1).order_by(User.truescore.desc()).all() - admins += g.db.query(User).filter(User.admin_level==1).order_by(User.truescore.desc()).all() - else: admins = g.db.query(User).filter(User.admin_level>0).order_by(User.truescore.desc()).all() + admins = g.db.query(User).filter(User.admin_level >= PERMS['ADMIN_MOP_VISIBLE']).order_by(User.truescore.desc()).all() return render_template("admins.html", v=v, admins=admins) - @app.get("/log") @app.get("/modlog") @auth_required