summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-04-03 15:45:10 +0000
committerDouwe Maan <douwe@gitlab.com>2018-04-03 15:45:10 +0000
commit67ca10f33ec41e7cecac152e016aa2c0956a7586 (patch)
tree91c3e38680b649407d784202f26d7e5e385742d2
parent4131c39a0bc41dbddabb2e110316e5048c907aa4 (diff)
parentb3723fe28ef5dde912994b2f180622aa87e96d12 (diff)
downloadgitlab-ce-67ca10f33ec41e7cecac152e016aa2c0956a7586.tar.gz
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
-rw-r--r--changelogs/unreleased/44425-use-gitlab_environment.yml5
-rw-r--r--lib/tasks/gitlab/two_factor.rake2
2 files changed, 6 insertions, 1 deletions
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