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:
authorRobert Speicher <rspeicher@gmail.com>2015-07-11 00:11:18 +0300
committerRobert Speicher <rspeicher@gmail.com>2015-07-11 00:18:17 +0300
commit800df45db2dd9f3baf8377896ecde8a917901fe6 (patch)
treec6da56aa6b6e3597f00cded3e095817b6a753c42 /app/controllers
parent22724418d350001e2683b68fad65186af783d3f2 (diff)
Add disable_two_factor route for Admin::Users
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin/users_controller.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index 7a683098df3..770fe00af51 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -55,6 +55,12 @@ class Admin::UsersController < Admin::ApplicationController
end
end
+ def disable_two_factor
+ user.disable_two_factor!
+ redirect_to admin_user_path(user),
+ notice: 'Two-factor Authentication has been disabled for this user'
+ end
+
def create
opts = {
force_random_password: true,