Class: GroupProjectsFinder
- Inherits:
-
ProjectsFinder
- Object
- UnionFinder
- ProjectsFinder
- GroupProjectsFinder
- Defined in:
- app/finders/group_projects_finder.rb
Overview
GroupProjectsFinder
Used to filter Projects by set of params
Arguments:
current_user - which user use
project_ids_relation: int[] - project ids to use
group
options:
exclude_shared: boolean
When true, only projects within the group are included in the result.
only_shared: boolean
When true, only projects arising from group-project shares are included in the result.
limit: integer
include_subgroups: boolean
include_ancestor_groups: boolean
params:
sort: string
visibility_level: int
tags: string[]
personal: boolean
search: string
non_archived: boolean
with_issues_enabled: boolean
with_merge_requests_enabled: boolean
min_access_level: int
owned: boolean
Constant Summary collapse
- DEFAULT_PROJECTS_LIMIT =
100
Instance Attribute Summary collapse
-
#group ⇒ Object
readonly
Returns the value of attribute group.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Attributes inherited from ProjectsFinder
#current_user, #params, #project_ids_relation
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(group:, params: {}, options: {}, current_user: nil, project_ids_relation: nil) ⇒ GroupProjectsFinder
constructor
A new instance of GroupProjectsFinder.
Methods included from UpdatedAtFilter
Methods included from CustomAttributesFilter
Methods inherited from UnionFinder
Constructor Details
#initialize(group:, params: {}, options: {}, current_user: nil, project_ids_relation: nil) ⇒ GroupProjectsFinder
Returns a new instance of GroupProjectsFinder.
36 37 38 39 40 41 42 43 44 |
# File 'app/finders/group_projects_finder.rb', line 36 def initialize(group:, params: {}, options: {}, current_user: nil, project_ids_relation: nil) super( params: params, current_user: current_user, project_ids_relation: project_ids_relation ) @group = group @options = end |
Instance Attribute Details
#group ⇒ Object (readonly)
Returns the value of attribute group.
34 35 36 |
# File 'app/finders/group_projects_finder.rb', line 34 def group @group end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
34 35 36 |
# File 'app/finders/group_projects_finder.rb', line 34 def @options end |
Instance Method Details
#execute ⇒ Object
46 47 48 49 |
# File 'app/finders/group_projects_finder.rb', line 46 def execute collection = super limit(collection) end |