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
path: root/lib/api
diff options
context:
space:
mode:
authorJan Christophersen <jan@ruken.pw>2018-01-19 10:33:58 +0300
committerJames Lopez <james@gitlab.com>2018-01-19 10:33:58 +0300
commit795e546b1c3c2433c046ffa517c0569a6c9ccdd0 (patch)
treeae92be261cf27498776783570816265d0377470a /lib/api
parent43538018261a5d1cccefecae895fad9e74adb1db (diff)
Resolve "Projects API: filter 'with_issues_enabled=true' returns projects with 'issues_enabled=false'"
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/projects.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index 653126e79ea..8b5e4f8edcc 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -76,9 +76,9 @@ module API
def present_projects(projects, options = {})
projects = reorder_projects(projects)
- projects = projects.with_statistics if params[:statistics]
- projects = projects.with_issues_enabled if params[:with_issues_enabled]
+ projects = projects.with_issues_available_for_user(current_user) if params[:with_issues_enabled]
projects = projects.with_merge_requests_enabled if params[:with_merge_requests_enabled]
+ projects = projects.with_statistics if params[:statistics]
projects = paginate(projects)
if current_user