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)