summaryrefslogtreecommitdiff
path: root/app/controllers/admin
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-25 10:52:10 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-25 10:52:10 +0200
commite02b7bf4435d0ff151239ac790849994066c0bc1 (patch)
treed0ff4d9d3a53d05e0a321e45f659adf4b5b84d92 /app/controllers/admin
parentf9ac553db1d0b97525ae4bdfbc83adff4537fa82 (diff)
downloadgitlab-ce-e02b7bf4435d0ff151239ac790849994066c0bc1.tar.gz
Improve abuse reports management
* Link to user profile instead of user admin page * One button for remove user and report * Remove user and report with page reloading Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/admin')
-rw-r--r--app/controllers/admin/abuse_reports_controller.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/admin/abuse_reports_controller.rb b/app/controllers/admin/abuse_reports_controller.rb
index 34f37bca4ad..38a5a9fca08 100644
--- a/app/controllers/admin/abuse_reports_controller.rb
+++ b/app/controllers/admin/abuse_reports_controller.rb
@@ -4,8 +4,13 @@ class Admin::AbuseReportsController < Admin::ApplicationController
end
def destroy
- AbuseReport.find(params[:id]).destroy
+ abuse_report = AbuseReport.find(params[:id])
- redirect_to admin_abuse_reports_path, notice: 'Report was removed'
+ if params[:remove_user]
+ abuse_report.user.destroy
+ end
+
+ abuse_report.destroy
+ render nothing: true
end
end