diff --git a/files/helpers/config/modaction_types.py b/files/helpers/config/modaction_types.py index e8cd79b07..79cf9a442 100644 --- a/files/helpers/config/modaction_types.py +++ b/files/helpers/config/modaction_types.py @@ -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() diff --git a/files/routes/admin.py b/files/routes/admin.py index 516616053..e763580c7 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -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!"}