diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /app/finders/group_members_finder.rb | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'app/finders/group_members_finder.rb')
-rw-r--r-- | app/finders/group_members_finder.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/finders/group_members_finder.rb b/app/finders/group_members_finder.rb index 09283f061c0..2417b1e0771 100644 --- a/app/finders/group_members_finder.rb +++ b/app/finders/group_members_finder.rb @@ -1,6 +1,9 @@ # frozen_string_literal: true class GroupMembersFinder < UnionFinder + RELATIONS = %i(direct inherited descendants).freeze + DEFAULT_RELATIONS = %i(direct inherited).freeze + include CreatedAtFilter # Params can be any of the following: @@ -17,11 +20,11 @@ class GroupMembersFinder < UnionFinder @params = params end - def execute(include_relations: [:inherited, :direct]) + def execute(include_relations: DEFAULT_RELATIONS) group_members = group_members_list relations = [] - return group_members if include_relations == [:direct] + return filter_members(group_members) if include_relations == [:direct] relations << group_members if include_relations.include?(:direct) |