diff options
Diffstat (limited to 'app/finders/group_members_finder.rb')
-rw-r--r-- | app/finders/group_members_finder.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/finders/group_members_finder.rb b/app/finders/group_members_finder.rb index 47ed623b252..05645dacab9 100644 --- a/app/finders/group_members_finder.rb +++ b/app/finders/group_members_finder.rb @@ -64,6 +64,7 @@ class GroupMembersFinder < UnionFinder members = members.by_access_level(params[:access_levels]) end + members = filter_by_user_type(members) members = apply_additional_filters(members) by_created_at(members) @@ -91,6 +92,12 @@ class GroupMembersFinder < UnionFinder end end + def filter_by_user_type(members) + return members unless params[:user_type] && can_manage_members + + members.filter_by_user_type(params[:user_type]) + end + def apply_additional_filters(members) # overridden in EE to include additional filtering conditions. members |