diff options
Diffstat (limited to 'app/models/admin')
-rw-r--r-- | app/models/admin/account_action.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/admin/account_action.rb b/app/models/admin/account_action.rb index cb6b4715a..9789cb553 100644 --- a/app/models/admin/account_action.rb +++ b/app/models/admin/account_action.rb @@ -13,6 +13,7 @@ class Admin::AccountAction silence suspend mark_unknown + manual_only ).freeze attr_accessor :target_account, @@ -69,6 +70,8 @@ class Admin::AccountAction handle_suspend! when 'mark_unknown' handle_mark_unknown! + when 'manual_only' + handle_manual_only! end end @@ -137,6 +140,12 @@ class Admin::AccountAction target_account.mark_unknown! end + def handle_manual_only! + authorize(target_account, :manual_only?) + log_action(:manual_only, target_account) + target_account.manual_only! + end + def text_for_warning [warning_preset&.text, text].compact.join("\n\n") end |