restore login_required mod log
parent
e7aa739e62
commit
30a8de0126
|
@ -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()
|
||||
|
|
|
@ -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!"}
|
||||
|
||||
|
|
Loading…
Reference in New Issue