diff options
author | Marin Jankovski <marin@gitlab.com> | 2014-06-23 09:45:26 +0200 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2014-06-23 09:45:26 +0200 |
commit | 37425618bc5a15bb58ed6695d4932d309d452cb2 (patch) | |
tree | be97eabfb404aeb181e525a2df07a87ebce907ba /app/controllers/admin/users_controller.rb | |
parent | 73c1030da1318284495288461210e8d145aa7181 (diff) | |
download | gitlab-ce-37425618bc5a15bb58ed6695d4932d309d452cb2.tar.gz |
Add option for admin to remove users secondary emails.
Diffstat (limited to 'app/controllers/admin/users_controller.rb')
-rw-r--r-- | app/controllers/admin/users_controller.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index 5ecdfbd807e..f0040bf5e87 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -100,6 +100,16 @@ class Admin::UsersController < Admin::ApplicationController end end + def remove_email + email = user.emails.find(params[:email_id]) + email.destroy + + respond_to do |format| + format.html { redirect_to :back, notice: "Successfully removed email." } + format.js { render nothing: true } + end + end + protected def user |