blob: b476b0bc184020eb30cd98e22a16535314419fce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
class MembersFinder < Projects::ApplicationController
def initialize(project_members, group)
@project_members = project_members
@group = group
end
def execute
non_null_user_ids = @project_members.where.not(user_id: nil).select(:user_id)
group_members = @group.group_members.where.not(user_id: non_null_user_ids)
group_members = group_members.non_invite unless can?(current_user, :admin_group, @group)
group_members
end
end
|