diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /app/models/members | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'app/models/members')
-rw-r--r-- | app/models/members/group_member.rb | 2 | ||||
-rw-r--r-- | app/models/members/project_namespace_member.rb | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/app/models/members/group_member.rb b/app/models/members/group_member.rb index 1ad4cb6d368..a8a4fbedc41 100644 --- a/app/models/members/group_member.rb +++ b/app/models/members/group_member.rb @@ -18,7 +18,7 @@ class GroupMember < Member default_scope { where(source_type: SOURCE_TYPE) } # rubocop:disable Cop/DefaultScope - scope :of_groups, ->(groups) { where(source_id: groups.select(:id)) } + scope :of_groups, ->(groups) { where(source_id: groups&.select(:id)) } scope :of_ldap_type, -> { where(ldap: true) } scope :count_users_by_group_id, -> { group(:source_id).count } scope :with_user, -> (user) { where(user: user) } diff --git a/app/models/members/project_namespace_member.rb b/app/models/members/project_namespace_member.rb new file mode 100644 index 00000000000..0e0c52ee3ca --- /dev/null +++ b/app/models/members/project_namespace_member.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +# TODO: https://gitlab.com/groups/gitlab-org/-/epics/7054 +# This file is a part of the Consolidate Group and Project member management epic, +# and will be developed further as we progress through that epic. +class ProjectNamespaceMember < ProjectMember # rubocop:disable Gitlab/NamespacedClass +end |