diff --git a/changelogs/unreleased/44425-use-gitlab_environment.yml b/changelogs/unreleased/44425-use-gitlab_environment.yml new file mode 100644 index 00000000000..a774143d5f5 --- /dev/null +++ b/changelogs/unreleased/44425-use-gitlab_environment.yml @@ -0,0 +1,5 @@ +--- +title: Fix `gitlab-rake gitlab:two_factor:disable_for_all_users` +merge_request: 18154 +author: +type: fixed diff --git a/lib/tasks/gitlab/two_factor.rake b/lib/tasks/gitlab/two_factor.rake index 7728c485e8d..6b22499a5c8 100644 --- a/lib/tasks/gitlab/two_factor.rake +++ b/lib/tasks/gitlab/two_factor.rake @@ -1,7 +1,7 @@ namespace :gitlab do namespace :two_factor do desc "GitLab | Disable Two-factor authentication (2FA) for all users" - task disable_for_all_users: :environment do + task disable_for_all_users: :gitlab_environment do scope = User.with_two_factor count = scope.count