switch to AEVANN_EXCLUDED_MODACTION_TYPES
parent
d4db5b3ebe
commit
2e12586bc0
|
@ -902,7 +902,7 @@ class User(Base):
|
|||
ModAction.user_id != self.id,
|
||||
)
|
||||
if self.id == AEVANN_ID:
|
||||
q = q.filter(ModAction.kind.in_(AEVANN_MODACTION_TYPES))
|
||||
q = q.filter(ModAction.kind.notin_(AEVANN_EXCLUDED_MODACTION_TYPES))
|
||||
|
||||
if self.admin_level < PERMS['PROGSTACK']:
|
||||
q = q.filter(ModAction.kind.notin_(MODACTION_PRIVILEGED__TYPES))
|
||||
|
|
|
@ -485,7 +485,5 @@ MODACTION_TYPES_FILTERED = deepcopy({t:v for t,v in MODACTION_TYPES.items()
|
|||
if not t in MODACTION_PRIVILEGED_TYPES})
|
||||
MODACTION_TYPES__FILTERED = deepcopy({t:v for t,v in MODACTION_TYPES.items()
|
||||
if not t in MODACTION_PRIVILEGED__TYPES})
|
||||
AEVANN_MODACTION_TYPES = {'ban_user','unban_user',
|
||||
'shadowban','unshadowban',
|
||||
'delete_media','reset_password','unchud',
|
||||
'mark_effortpost', 'unmark_effortpost'}
|
||||
AEVANN_EXCLUDED_MODACTION_TYPES = {'pin_post', 'unpin_post'
|
||||
'pin_comment', 'unpin_comment'}
|
||||
|
|
|
@ -257,7 +257,7 @@ def notifications_modactions(v):
|
|||
listing = g.db.query(cls).filter(cls.user_id != v.id)
|
||||
|
||||
if v.id == AEVANN_ID:
|
||||
listing = listing.filter(cls.kind.in_(AEVANN_MODACTION_TYPES))
|
||||
listing = listing.filter(cls.kind.notin_(AEVANN_EXCLUDED_MODACTION_TYPES))
|
||||
|
||||
if v.admin_level < PERMS['PROGSTACK']:
|
||||
listing = listing.filter(cls.kind.notin_(MODACTION_PRIVILEGED__TYPES))
|
||||
|
|
Loading…
Reference in New Issue