about summary refs log tree commit diff
path: root/app/controllers/admin/reports/actions_controller.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-03-01 22:20:29 +0100
committerGitHub <noreply@github.com>2022-03-01 22:20:29 +0100
commit25d3dc4373531071f444d8e44e44cd21970cb373 (patch)
treec58f2e336ebdc3e15de07395bde6dd3ed80a4e24 /app/controllers/admin/reports/actions_controller.rb
parent14919fe11e9a1dd5cbf12969a2957d0d05bb0534 (diff)
Add ability to mark statuses as sensitive from reports in admin UI (#17668)
* Add ability to mark statuses as sensitive from reports in admin UI

* Allow mark as sensitive action on statuses with preview cards
Diffstat (limited to 'app/controllers/admin/reports/actions_controller.rb')
-rw-r--r--app/controllers/admin/reports/actions_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/admin/reports/actions_controller.rb b/app/controllers/admin/reports/actions_controller.rb
index 05a4fb63d..5cb5c744f 100644
--- a/app/controllers/admin/reports/actions_controller.rb
+++ b/app/controllers/admin/reports/actions_controller.rb
@@ -7,7 +7,7 @@ class Admin::Reports::ActionsController < Admin::BaseController
     authorize @report, :show?
 
     case action_from_button
-    when 'delete'
+    when 'delete', 'mark_as_sensitive'
       status_batch_action = Admin::StatusBatchAction.new(
         type: action_from_button,
         status_ids: @report.status_ids,
@@ -41,6 +41,8 @@ class Admin::Reports::ActionsController < Admin::BaseController
   def action_from_button
     if params[:delete]
       'delete'
+    elsif params[:mark_as_sensitive]
+      'mark_as_sensitive'
     elsif params[:silence]
       'silence'
     elsif params[:suspend]