Class: Search::GroupService
- Inherits:
-
GlobalService
- Object
- GlobalService
- Search::GroupService
- Defined in:
- app/services/search/group_service.rb
Constant Summary
Constants inherited from GlobalService
Search::GlobalService::ALLOWED_SCOPES, Search::GlobalService::DEFAULT_SCOPE
Instance Attribute Summary collapse
-
#group ⇒ Object
Returns the value of attribute group.
Attributes inherited from GlobalService
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(user, group, params) ⇒ GroupService
constructor
A new instance of GroupService.
- #projects ⇒ Object
Methods inherited from GlobalService
Constructor Details
#initialize(user, group, params) ⇒ GroupService
Returns a new instance of GroupService.
7 8 9 10 11 |
# File 'app/services/search/group_service.rb', line 7 def initialize(user, group, params) super(user, params) @group = group end |
Instance Attribute Details
#group ⇒ Object
Returns the value of attribute group.
5 6 7 |
# File 'app/services/search/group_service.rb', line 5 def group @group end |
Instance Method Details
#execute ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/services/search/group_service.rb', line 13 def execute Gitlab::GroupSearchResults.new( current_user, params[:search], projects, group: group, order_by: params[:order_by], sort: params[:sort], filters: filters ) end |
#projects ⇒ Object
25 26 27 28 29 30 |
# File 'app/services/search/group_service.rb', line 25 def projects return Project.none unless group return @projects if defined? @projects @projects = super.inside_path(group.full_path) end |