Merge branch '44425-use-gitlab_environment' into 'master'

Resolve "Disabling two factor authentication via gitlab-rake fails"

Closes #44425

See merge request gitlab-org/gitlab-ce!18154
This commit is contained in:
Douwe Maan 2018-04-03 15:45:10 +00:00
commit 67ca10f33e
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
title: Fix `gitlab-rake gitlab:two_factor:disable_for_all_users`
merge_request: 18154
author:
type: fixed

View File

@ -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