2019-09-04 12:33:02 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module FindGroupProjects
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
2020-06-19 14:08:39 -04:00
|
|
|
def group_projects_for(user:, group:, only_owned: true)
|
2019-09-04 12:33:02 -04:00
|
|
|
GroupProjectsFinder.new(
|
|
|
|
group: group,
|
|
|
|
current_user: user,
|
2020-06-19 14:08:39 -04:00
|
|
|
options: { include_subgroups: true, only_owned: only_owned }
|
2019-09-04 12:33:02 -04:00
|
|
|
).execute
|
|
|
|
end
|
|
|
|
end
|