2017-04-13 11:20:04 -04:00
|
|
|
module Search
|
|
|
|
class GroupService < Search::GlobalService
|
|
|
|
attr_accessor :group
|
|
|
|
|
|
|
|
def initialize(user, group, params)
|
|
|
|
super(user, params)
|
|
|
|
|
2017-12-15 05:21:12 -05:00
|
|
|
@default_project_filter = false
|
2017-04-13 11:20:04 -04:00
|
|
|
@group = group
|
|
|
|
end
|
|
|
|
|
|
|
|
def projects
|
|
|
|
return Project.none unless group
|
|
|
|
return @projects if defined? @projects
|
|
|
|
|
|
|
|
@projects = super.inside_path(group.full_path)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|