summaryrefslogtreecommitdiff
path: root/lib/api/groups.rb
diff options
context:
space:
mode:
authorAlessio Caiazza <acaiazza@gitlab.com>2018-07-03 15:30:09 +0200
committerAlessio Caiazza <acaiazza@gitlab.com>2018-07-03 15:30:09 +0200
commit1432e5605c1d77fc76aa64b5a8da87cb3266a0dc (patch)
tree4273854cc5f0253e5970bd1ccc7ff3ac9774c4cc /lib/api/groups.rb
parent7780cd6ab1b3dc572ac85660744a315e1cf64f8d (diff)
parentc489d53b2e2eecb22f8dc7034da142221220e89f (diff)
downloadgitlab-ce-11-1-stable-prepare-rc3.tar.gz
Merge branch 'master' into 11-1-stable-prepare-rc311-1-stable-prepare-rc3
Diffstat (limited to 'lib/api/groups.rb')
-rw-r--r--lib/api/groups.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb
index c7f41aba854..f633dd88d06 100644
--- a/lib/api/groups.rb
+++ b/lib/api/groups.rb
@@ -56,6 +56,8 @@ module API
def find_group_projects(params)
group = find_group!(params[:id])
projects = GroupProjectsFinder.new(group: group, current_user: current_user, params: project_finder_params).execute
+ 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 = reorder_projects(projects)
paginate(projects)
end
@@ -191,6 +193,8 @@ module API
desc: 'Return only the ID, URL, name, and path of each project'
optional :owned, type: Boolean, default: false, desc: 'Limit by owned by authenticated user'
optional :starred, type: Boolean, default: false, desc: 'Limit by starred status'
+ optional :with_issues_enabled, type: Boolean, default: false, desc: 'Limit by enabled issues feature'
+ optional :with_merge_requests_enabled, type: Boolean, default: false, desc: 'Limit by enabled merge requests feature'
use :pagination
use :with_custom_attributes