From 795e546b1c3c2433c046ffa517c0569a6c9ccdd0 Mon Sep 17 00:00:00 2001 From: Jan Christophersen Date: Fri, 19 Jan 2018 07:33:58 +0000 Subject: Resolve "Projects API: filter 'with_issues_enabled=true' returns projects with 'issues_enabled=false'" --- lib/api/projects.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/api') 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 -- cgit v1.2.1