add CAN_PING_ALL_GROUPS perm for myself

pull/135/head
Aevann 2023-02-27 03:13:38 +02:00
parent 2ff83e7740
commit 9078ddbc34
2 changed files with 2 additions and 1 deletions

View File

@ -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)

View File

@ -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 = {