Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Rochkind <jonathan@dnil.net>2015-10-08 18:13:28 +0300
committerJonathan Rochkind <jonathan@dnil.net>2015-10-09 00:33:57 +0300
commitae4fbae26cefbf10848719ee8c06d418c348420c (patch)
tree147370c32c20f1c78b0e078e442b4c7ba5bf1001 /app/controllers/abuse_reports_controller.rb
parent0de7c83a78711601b40b5a739070da2e3af29b11 (diff)
Send an email (to support) when a user is reported for spam
Diffstat (limited to 'app/controllers/abuse_reports_controller.rb')
-rw-r--r--app/controllers/abuse_reports_controller.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/abuse_reports_controller.rb b/app/controllers/abuse_reports_controller.rb
index 65dbd5ef551..482ec5054ac 100644
--- a/app/controllers/abuse_reports_controller.rb
+++ b/app/controllers/abuse_reports_controller.rb
@@ -11,6 +11,9 @@ class AbuseReportsController < ApplicationController
if @abuse_report.save
message = "Thank you for your report. A GitLab administrator will look into it shortly."
redirect_to root_path, notice: message
+ if current_application_settings.admin_notification_email.present?
+ AbuseReportMailer.delay.notify(@abuse_report, current_application_settings.admin_notification_email)
+ end
else
render :new
end