Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRoger Rüttimann <ror@panter.ch>2019-02-07 17:20:58 +0300
committerRoger Meier <r.meier@siemens.com>2019-06-13 09:43:14 +0300
commit28782d5165fee8251321fce65e54c4722a4db581 (patch)
treed97207a33921788e07949e5533cc19b4f6bc15b4 /app
parentdfe5ffd4edd34adc9dbb941f22a8843ee4f12e6d (diff)
remove experiments for 2fa requirements and fix tests
Diffstat (limited to 'app')
-rw-r--r--app/models/group.rb2
-rw-r--r--app/models/user.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/app/models/group.rb b/app/models/group.rb
index dd8baddd789..5e58b48a366 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -423,7 +423,7 @@ class Group < Namespace
def update_two_factor_requirement
return unless saved_change_to_require_two_factor_authentication? || saved_change_to_two_factor_grace_period?
- [users_with_descendants, project_users_with_descendants].each {|set| set.find_each(&:update_two_factor_requirement)}
+ User.from_union([users_with_descendants, project_users_with_descendants]).find_each(&:update_two_factor_requirement)
end
def path_changed_hook
diff --git a/app/models/user.rb b/app/models/user.rb
index f3deea75dbb..916a0aa74f0 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -728,8 +728,8 @@ class User < ApplicationRecord
end
def expanded_groups_requiring_two_factor_authentication
- all_expanded_groups.where(require_two_factor_authentication: true).merge(
- authorized_groups.where(require_two_factor_authentication: true))
+ Group.from_union([all_expanded_groups.where(require_two_factor_authentication: true),
+ authorized_groups.where(require_two_factor_authentication: true)])
end
# rubocop: disable CodeReuse/ServiceClass