Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Javier López <fjlopez@gitlab.com>2019-05-07 14:08:25 +0300
committerJames Lopez <james@gitlab.com>2019-05-07 14:08:25 +0300
commit68e533dc219be27f3485d2335e70aa61a193dabb (patch)
treef26b2a94b515469839f8498e18698f3782187260 /lib/gitlab/group_search_results.rb
parent0910dfb9d6eb9748b6ca24e10a3382a6515615e5 (diff)
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.rb6
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