diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-10-07 15:46:18 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-10-07 15:46:18 -0400 |
commit | c3d9c55b23183a51c941800d94ed0ff085e5a3b8 (patch) | |
tree | 3960cb7e633a0a674d84108434f7357cf39398b8 | |
parent | 1f11096c17ac1ea1bd9b62d661795e32af854e48 (diff) | |
download | gitlab-ce-c3d9c55b23183a51c941800d94ed0ff085e5a3b8.tar.gz |
Add gitlab:two_factor:disable_for_all_users task
-rw-r--r-- | lib/tasks/gitlab/two_factor.rake | 10 |
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 |