diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-03-18 12:04:56 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-03-18 21:03:39 +0100 |
commit | cf52a9b4354de62f9559b19cf77845f55053f2db (patch) | |
tree | eb54a5d2a8933d995d55e6288d3c65f1e32ec8ff /lib/api | |
parent | 4d48c6076e195eb01d1858db4682c393a7eb81d4 (diff) | |
download | gitlab-ce-cf52a9b4354de62f9559b19cf77845f55053f2db.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 'lib/api')
-rw-r--r-- | lib/api/issues.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/issues.rb b/lib/api/issues.rb index 252744515da..fda6f841438 100644 --- a/lib/api/issues.rb +++ b/lib/api/issues.rb @@ -82,7 +82,7 @@ module API # GET /projects/:id/issues?milestone=1.0.0&state=closed # GET /issues?iid=42 get ":id/issues" do - issues = user_project.issues + issues = user_project.issues.visible_to_user(current_user) issues = filter_issues_state(issues, params[:state]) unless params[:state].nil? issues = filter_issues_labels(issues, params[:labels]) unless params[:labels].nil? issues = filter_by_iid(issues, params[:iid]) unless params[:iid].nil? @@ -104,6 +104,7 @@ module API # GET /projects/:id/issues/:issue_id get ":id/issues/:issue_id" do @issue = user_project.issues.find(params[:issue_id]) + not_found! unless can?(current_user, :read_issue, @issue) present @issue, with: Entities::Issue end |