From 8bed8c64e8ae2b0630128f353e1d11e755914b54 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Thu, 6 Oct 2022 00:55:54 -0700 Subject: [PATCH] rearrange and rename a couple of permissions --- files/classes/user.py | 2 +- files/helpers/const.py | 18 +++++++++--------- files/routes/admin.py | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/files/classes/user.py b/files/classes/user.py index 59a157d72..01c4c56e9 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -319,7 +319,7 @@ class User(Base): @lazy def mod_date(self, sub): - if self.admin_level >= PERMS['GLOBAL_HOLE_MODERATION']: return 1 + if self.admin_level >= PERMS['HOLE_GLOBAL_MODERATION']: return 1 mod = g.db.query(Mod).filter_by(user_id=self.id, sub=sub).one_or_none() if not mod: return None return mod.created_utc diff --git a/files/helpers/const.py b/files/helpers/const.py index a7d2d8f00..2fe736942 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -121,7 +121,15 @@ AGENDAPOSTER_MSG_HTML = """

Hi /') -@admin_level_required(PERMS['MERGE_USERS']) +@admin_level_required(PERMS['USER_MERGE']) 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(PERMS['MERGE_USERS']) +@admin_level_required(PERMS['USER_MERGE']) def merge_all(v, id): if v.id != AEVANN_ID: abort(403)