diff --git a/changelogs/unreleased/44425-use-gitlab_environment.yml b/changelogs/unreleased/44425-use-gitlab_environment.yml new file mode 100644 index 0000000000000000000000000000000000000000..a774143d5f596f114dc4bcd0970a555416f64e0d --- /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 7728c485e8dbc0b3d52ff117bd34232c2cd2b919..6b22499a5c8d4798d14f69bdc0cf390c6c38a477 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