From 3cf972ef9ae3436a2c98f959d465d11e4108d53a Mon Sep 17 00:00:00 2001 From: justcool393 Date: Wed, 5 Oct 2022 20:33:23 -0700 Subject: [PATCH] merge permission --- files/helpers/const.py | 1 + files/routes/admin.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index f54dd597d..cefd6a5e5 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -147,6 +147,7 @@ PERMS = { # Minimum admin_level to perform action. 'VIEW_MODMAIL': 2, 'PRINT_MARSEYBUX_FOR_KIPPY_ON_PCMEMES': 3, 'VIEW_ACTIVE_USERS': 2, + 'MERGE_USERS': 3, # note: extra check for Aevann } FEATURES = { diff --git a/files/routes/admin.py b/files/routes/admin.py index 7b6f043c1..668bda938 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -44,7 +44,7 @@ def loggedout_list(v): return render_template("loggedout.html", v=v, users=users) @app.get('/admin/merge//') -@admin_level_required(3) +@admin_level_required(PERMS['MERGE_USERS']) def merge(v, id1, id2): if v.id != AEVANN_ID: abort(403) @@ -106,7 +106,7 @@ def merge(v, id1, id2): @app.get('/admin/merge_all/') -@admin_level_required(3) +@admin_level_required(PERMS['MERGE_USERS']) def merge_all(v, id): if v.id != AEVANN_ID: abort(403)