From 9078ddbc3467b138f0c2e5766caa81b3272a8bd1 Mon Sep 17 00:00:00 2001 From: Aevann Date: Mon, 27 Feb 2023 03:13:38 +0200 Subject: [PATCH] add CAN_PING_ALL_GROUPS perm for myself --- files/helpers/alerts.py | 2 +- files/helpers/config/const.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/files/helpers/alerts.py b/files/helpers/alerts.py index 269e6fe68..a8426dd55 100644 --- a/files/helpers/alerts.py +++ b/files/helpers/alerts.py @@ -136,7 +136,7 @@ def NOTIFY_USERS(text, v): for i in group_mention_regex.finditer(text): group = g.db.get(Group, i.group(2)) if group: - if v.id not in group.member_ids: + if v.id not in group.member_ids and v.admin_level < PERMS['CAN_PING_ALL_GROUPS']: abort(403, "Only members of the ping group can ping it!") notify_users.update(group.member_ids) diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index 2610ecafd..e21e021b0 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -495,6 +495,7 @@ PERMS = { # Minimum admin_level to perform action. 'SEE_GHOST_VOTES': 7, 'MODS_EVERY_HOLE': 8, + 'CAN_PING_ALL_GROUPS': 8, } FEATURES = {