diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-20 16:49:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-20 16:49:51 +0300 |
commit | 71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e (patch) | |
tree | 6a2d93ef3fb2d353bb7739e4b57e6541f51cdd71 /app/controllers/abuse_reports_controller.rb | |
parent | a7253423e3403b8c08f8a161e5937e1488f5f407 (diff) |
Add latest changes from gitlab-org/gitlab@15-9-stable-eev15.9.0-rc42
Diffstat (limited to 'app/controllers/abuse_reports_controller.rb')
-rw-r--r-- | app/controllers/abuse_reports_controller.rb | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/app/controllers/abuse_reports_controller.rb b/app/controllers/abuse_reports_controller.rb index eec56682300..f6b4fbac8d5 100644 --- a/app/controllers/abuse_reports_controller.rb +++ b/app/controllers/abuse_reports_controller.rb @@ -19,6 +19,13 @@ class AbuseReportsController < ApplicationController reported_from_url: report_params[:reported_from_url] ) + Gitlab::Tracking.event( + 'ReportAbuse', + 'select_abuse_category', + property: report_params[:category], + user: @user + ) + render :new end @@ -29,6 +36,13 @@ class AbuseReportsController < ApplicationController if @abuse_report.save @abuse_report.notify + Gitlab::Tracking.event( + 'ReportAbuse', + 'submit_form', + property: @abuse_report.category, + user: @abuse_report.user + ) + message = _("Thank you for your report. A GitLab administrator will look into it shortly.") redirect_to root_path, notice: message elsif report_params[:user_id].present? @@ -41,7 +55,7 @@ class AbuseReportsController < ApplicationController private def report_params - params.require(:abuse_report).permit(:message, :user_id, :category, :reported_from_url) + params.require(:abuse_report).permit(:message, :user_id, :category, :reported_from_url, links_to_spam: []) end # rubocop: disable CodeReuse/ActiveRecord |