diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-16 18:09:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-16 18:09:38 +0300 |
commit | 2d8454515e7b631a8f39a6415c86154d6c62841c (patch) | |
tree | d3d5fac01f23a735226cf20a4073e2cb611664d3 /app/models/members | |
parent | 9d67bc14cb59a27c9877474e77d155173a1dedff (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/members')
-rw-r--r-- | app/models/members/group_member.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/app/models/members/group_member.rb b/app/models/members/group_member.rb index 9a916cd40ae..8c224dea88f 100644 --- a/app/models/members/group_member.rb +++ b/app/models/members/group_member.rb @@ -17,14 +17,7 @@ class GroupMember < Member scope :of_groups, ->(groups) { where(source_id: groups.select(:id)) } scope :of_ldap_type, -> { where(ldap: true) } - - scope :count_users_by_group_id, -> do - if Feature.enabled?(:optimized_count_users_by_group_id) - group(:source_id).count - else - joins(:user).group(:source_id).count - end - end + scope :count_users_by_group_id, -> { group(:source_id).count } after_create :update_two_factor_requirement, unless: :invite? after_destroy :update_two_factor_requirement, unless: :invite? |