Add gitlab:two_factor:disable_for_all_users task
This commit is contained in:
parent
1f11096c17
commit
c3d9c55b23
1 changed files with 10 additions and 0 deletions
10
lib/tasks/gitlab/two_factor.rake
Normal file
10
lib/tasks/gitlab/two_factor.rake
Normal file
|
@ -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
|
Loading…
Reference in a new issue