summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-03-18 12:04:56 +0000
committerDouwe Maan <douwe@gitlab.com>2016-03-18 12:04:56 +0000
commit9813eac56ba6120ef046b5dddba6fd72ce1933a6 (patch)
treeaa1b50b0d80253dfca7746312db0ed46e593448a /app/services
parent726f1efdb767407acf461a6811b396bfa5f0df35 (diff)
parent5ed7e2cfd5de7c1db0374594428895e84e98321e (diff)
downloadgitlab-ce-9813eac56ba6120ef046b5dddba6fd72ce1933a6.tar.gz
Merge branch 'confidential-issues' into 'master'
Add confidential issues Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/3678 More information: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/227 See merge request !3282
Diffstat (limited to 'app/services')
-rw-r--r--app/services/projects/autocomplete_service.rb6
-rw-r--r--app/services/search/global_service.rb2
-rw-r--r--app/services/search/project_service.rb3
3 files changed, 4 insertions, 7 deletions
diff --git a/app/services/projects/autocomplete_service.rb b/app/services/projects/autocomplete_service.rb
index 7408e09ed1e..ba50305dbd5 100644
--- a/app/services/projects/autocomplete_service.rb
+++ b/app/services/projects/autocomplete_service.rb
@@ -1,11 +1,7 @@
module Projects
class AutocompleteService < BaseService
- def initialize(project)
- @project = project
- end
-
def issues
- @project.issues.opened.select([:iid, :title])
+ @project.issues.visible_to_user(current_user).opened.select([:iid, :title])
end
def merge_requests
diff --git a/app/services/search/global_service.rb b/app/services/search/global_service.rb
index e1e94c5cc38..aa9837038a6 100644
--- a/app/services/search/global_service.rb
+++ b/app/services/search/global_service.rb
@@ -11,7 +11,7 @@ module Search
projects = ProjectsFinder.new.execute(current_user)
projects = projects.in_namespace(group.id) if group
- Gitlab::SearchResults.new(projects, params[:search])
+ Gitlab::SearchResults.new(current_user, projects, params[:search])
end
end
end
diff --git a/app/services/search/project_service.rb b/app/services/search/project_service.rb
index c08881dce4b..4b500914cfb 100644
--- a/app/services/search/project_service.rb
+++ b/app/services/search/project_service.rb
@@ -7,7 +7,8 @@ module Search
end
def execute
- Gitlab::ProjectSearchResults.new(project,
+ Gitlab::ProjectSearchResults.new(current_user,
+ project,
params[:search],
params[:repository_ref])
end