diff --git a/files/classes/user.py b/files/classes/user.py index cbe1b4ac4..2cc384c03 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -922,7 +922,7 @@ class User(Base): q = q.filter(ModAction.kind.notin_(AEVANN_EXCLUDED_MODACTION_KINDS)) if self.admin_level < PERMS['PROGSTACK']: - q = q.filter(ModAction.kind.notin_(MODACTION_PRIVILEGED__TYPES)) + q = q.filter(ModAction.kind.notin_(MODACTION_PRIVILEGED__KINDS)) return q.count() diff --git a/files/helpers/config/modaction_kinds.py b/files/helpers/config/modaction_kinds.py index 0b92db6f5..e991e7824 100644 --- a/files/helpers/config/modaction_kinds.py +++ b/files/helpers/config/modaction_kinds.py @@ -479,12 +479,12 @@ MODACTION_PRIVILEGED_KINDS = { 'insert_transaction', 'change_under_siege', } -MODACTION_PRIVILEGED__TYPES = {'progstack_post', 'progstack_comment', +MODACTION_PRIVILEGED__KINDS = {'progstack_post', 'progstack_comment', 'unprogstack_post', 'unprogstack_comment'} MODACTION_KINDS_FILTERED = deepcopy({t:v for t,v in MODACTION_KINDS.items() if not t in MODACTION_PRIVILEGED_KINDS}) MODACTION_KINDS__FILTERED = deepcopy({t:v for t,v in MODACTION_KINDS.items() - if not t in MODACTION_PRIVILEGED__TYPES}) + if not t in MODACTION_PRIVILEGED__KINDS}) AEVANN_EXCLUDED_MODACTION_KINDS = {'pin_post', 'unpin_post', 'pin_comment', 'unpin_comment', 'approve_emoji', 'reject_emoji', diff --git a/files/routes/notifications.py b/files/routes/notifications.py index e2c98f7fb..7cd312b76 100644 --- a/files/routes/notifications.py +++ b/files/routes/notifications.py @@ -269,7 +269,7 @@ def notifications_modactions(v): listing = listing.filter(cls.kind.notin_(AEVANN_EXCLUDED_MODACTION_KINDS)) if v.admin_level < PERMS['PROGSTACK']: - listing = listing.filter(cls.kind.notin_(MODACTION_PRIVILEGED__TYPES)) + listing = listing.filter(cls.kind.notin_(MODACTION_PRIVILEGED__KINDS)) if cls == HoleAction: listing = listing.filter(cls.hole.in_(v.moderated_holes))