restore login_required mod log

pull/136/head
Aevann 2023-03-01 22:45:42 +02:00
parent e7aa739e62
commit 30a8de0126
2 changed files with 7 additions and 7 deletions

View File

@ -397,7 +397,8 @@ MODACTION_PRIVILEGED_TYPES = {'shadowban', 'unshadowban',
'mod_mute_user', 'mod_unmute_user',
'link_accounts', 'delink_accounts',
'progstack_post', 'progstack_comment',
'unprogstack_post', 'unprogstack_comment'}
'unprogstack_post', 'unprogstack_comment'
'enable_signups'}
MODACTION_PRIVILEGED__TYPES = {'progstack_post', 'progstack_comment',
'unprogstack_post', 'unprogstack_comment'}
MODACTION_TYPES_FILTERED = deepcopy({t:v for t,v in MODACTION_TYPES.items()

View File

@ -375,12 +375,11 @@ def change_settings(v:User, setting):
if not set_security_level(new_security_level):
abort(400, f'Failed to {word} under attack mode')
if setting != 'login_required':
ma = ModAction(
kind=f"{word}_{setting}",
user_id=v.id,
)
g.db.add(ma)
ma = ModAction(
kind=f"{word}_{setting}",
user_id=v.id,
)
g.db.add(ma)
return {'message': f"{setting.replace('_', ' ').title()} {word}d successfully!"}