summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 916a0aa74f0..f3deea75dbb 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
- Group.from_union([all_expanded_groups.where(require_two_factor_authentication: true),
- authorized_groups.where(require_two_factor_authentication: true)])
+ all_expanded_groups.where(require_two_factor_authentication: true).merge(
+ authorized_groups.where(require_two_factor_authentication: true))
end
# rubocop: disable CodeReuse/ServiceClass