im genuinely stupid

pull/98/head
Aevann 2023-01-25 18:52:16 +02:00
parent f6e4855485
commit e8a61b133f
2 changed files with 2 additions and 2 deletions

View File

@ -367,6 +367,6 @@ MODACTION_PRIVILEGED_TYPES = {'shadowban', 'unshadowban',
'mod_mute_user', 'mod_unmute_user',
'link_accounts', 'delink_accounts',
'progstack_post', 'progstack_comment'}
_MODACTION_PRIVILEGED_TYPES = {'progstack_post', 'progstack_comment'}
MODACTION_PRIVILEGED__TYPES = {'progstack_post', 'progstack_comment'}
MODACTION_TYPES_FILTERED = deepcopy({t:v for t,v in MODACTION_TYPES.items()
if not t in MODACTION_PRIVILEGED_TYPES})

View File

@ -149,7 +149,7 @@ def log(v:User):
if not (v and v.admin_level >= PERMS['USER_SHADOWBAN']):
actions = actions.filter(ModAction.kind.notin_(MODACTION_PRIVILEGED_TYPES))
if not (v and v.admin_level >= PERMS['PROGSTACK']):
actions = actions.filter(ModAction.kind.notin_(_MODACTION_PRIVILEGED_TYPES))
actions = actions.filter(ModAction.kind.notin_(MODACTION_PRIVILEGED__TYPES))
if admin_id:
actions = actions.filter_by(user_id=admin_id)
kinds = set([x.kind for x in actions])