diff options
author | Ash McKenzie <ash@the-rebellion.net> | 2019-07-18 12:09:30 +1000 |
---|---|---|
committer | Ash McKenzie <amckenzie@gitlab.com> | 2019-07-18 12:34:17 +1000 |
commit | f53112de5931144ac74819f87c227f06e115ba58 (patch) | |
tree | 3181a5601e537b32100f88389779903976097b7a /app/models/members | |
parent | d00d60a66deeacb19ccbd39501946ed646db64b6 (diff) | |
download | gitlab-ce-f53112de5931144ac74819f87c227f06e115ba58.tar.gz |
New GroupMember.of_ldap_type scope39-count-unique-users-for-more-accurate-smau-reporting
Diffstat (limited to 'app/models/members')
-rw-r--r-- | app/models/members/group_member.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/members/group_member.rb b/app/models/members/group_member.rb index 4cba69069bb..341d2fe2149 100644 --- a/app/models/members/group_member.rb +++ b/app/models/members/group_member.rb @@ -13,8 +13,8 @@ class GroupMember < Member default_scope { where(source_type: SOURCE_TYPE) } scope :of_groups, ->(groups) { where(source_id: groups.select(:id)) } - scope :count_users_by_group_id, -> { joins(:user).group(:source_id).count } + scope :of_ldap_type, -> { where(ldap: true) } after_create :update_two_factor_requirement, unless: :invite? after_destroy :update_two_factor_requirement, unless: :invite? |