diff options
author | Francisco Javier López <fjlopez@gitlab.com> | 2019-05-07 11:08:25 +0000 |
---|---|---|
committer | James Lopez <james@gitlab.com> | 2019-05-07 11:08:25 +0000 |
commit | 68e533dc219be27f3485d2335e70aa61a193dabb (patch) | |
tree | f26b2a94b515469839f8498e18698f3782187260 /lib/gitlab/group_search_results.rb | |
parent | 0910dfb9d6eb9748b6ca24e10a3382a6515615e5 (diff) | |
download | gitlab-ce-68e533dc219be27f3485d2335e70aa61a193dabb.tar.gz |
Add improvements to the global search process
Removed the conditions added to
Project.with_feature_available_for_user, and moved to the
IssuableFinder. Now, we ensure that, in the projects retrieved
in the Finder, the user has enough access for the feature.
Diffstat (limited to 'lib/gitlab/group_search_results.rb')
-rw-r--r-- | lib/gitlab/group_search_results.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/group_search_results.rb b/lib/gitlab/group_search_results.rb index 7255293b194..334642f252e 100644 --- a/lib/gitlab/group_search_results.rb +++ b/lib/gitlab/group_search_results.rb @@ -2,6 +2,8 @@ module Gitlab class GroupSearchResults < SearchResults + attr_reader :group + def initialize(current_user, limit_projects, group, query, default_project_filter: false, per_page: 20) super(current_user, limit_projects, query, default_project_filter: default_project_filter, per_page: per_page) @@ -26,5 +28,9 @@ module Gitlab .where(id: groups.select('members.user_id')) end # rubocop:enable CodeReuse/ActiveRecord + + def issuable_params + super.merge(group_id: group.id) + end end end |