diff options
author | Stan Hu <stanhu@gmail.com> | 2015-07-29 07:32:01 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-08-05 00:35:53 -0700 |
commit | 0c1ccda43fe04300a07a5f046a7c1cbae56cff32 (patch) | |
tree | 6d8a997d15e58813a78e0f2806543e0b2388f756 /app/controllers | |
parent | 4c9ba632e9468a0a8f37a031d0be90645ee6be2c (diff) | |
download | gitlab-ce-0c1ccda43fe04300a07a5f046a7c1cbae56cff32.tar.gz |
Add "Confirm user" button in user admin page
Closes #2116
Closes https://github.com/gitlabhq/gitlabhq/issues/9502
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin/users_controller.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index 770fe00af51..6092c79c254 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -55,6 +55,14 @@ class Admin::UsersController < Admin::ApplicationController end end + def confirm + if user.confirm! + redirect_to :back, notice: "Successfully confirmed" + else + redirect_to :back, alert: "Error occurred. User was not confirmed" + end + end + def disable_two_factor user.disable_two_factor! redirect_to admin_user_path(user), |