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