From c3d9c55b23183a51c941800d94ed0ff085e5a3b8 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 7 Oct 2015 15:46:18 -0400 Subject: [PATCH] Add gitlab:two_factor:disable_for_all_users task --- lib/tasks/gitlab/two_factor.rake | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lib/tasks/gitlab/two_factor.rake diff --git a/lib/tasks/gitlab/two_factor.rake b/lib/tasks/gitlab/two_factor.rake new file mode 100644 index 00000000000..acd4b7da39b --- /dev/null +++ b/lib/tasks/gitlab/two_factor.rake @@ -0,0 +1,10 @@ +namespace :gitlab do + namespace :two_factor do + desc "GitLab | Disable Two-factor authentication (2FA) for all users" + task disable_for_all_users: :environment do + User.with_two_factor.find_each do |user| + user.disable_two_factor! + end + end + end +end