summaryrefslogtreecommitdiff
path: root/lib/tasks/gitlab/two_factor.rake
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks/gitlab/two_factor.rake')
-rw-r--r--lib/tasks/gitlab/two_factor.rake10
1 files changed, 10 insertions, 0 deletions
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