summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFelipe Artur <fcardozo@gitlab.com>2019-09-04 16:33:02 +0000
committerMichael Kozono <mkozono@gmail.com>2019-09-04 16:33:02 +0000
commit13fc0efa5725d94cda527dc487d8dfdb7e90ed21 (patch)
treee059e8ad1ffece44218974140ec04cdfe8de5a07 /lib
parent24de5d65733de22fd067f150e65e36eb6121d17f (diff)
downloadgitlab-ce-13fc0efa5725d94cda527dc487d8dfdb7e90ed21.tar.gz
Let project reporters create issue from group boards
The current state of group issue boards does not show the "Add issues" button on the UI for users that are reporters of group child projects.
Diffstat (limited to 'lib')
-rw-r--r--lib/api/groups.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb
index 0bcd09d3977..0b086f2e36d 100644
--- a/lib/api/groups.rb
+++ b/lib/api/groups.rb
@@ -75,6 +75,7 @@ module API
).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 = projects.visible_to_user_and_access_level(current_user, params[:min_access_level]) if params[:min_access_level]
projects = reorder_projects(projects)
paginate(projects)
end
@@ -213,6 +214,7 @@ module API
optional :with_merge_requests_enabled, type: Boolean, default: false, desc: 'Limit by enabled merge requests feature'
optional :with_shared, type: Boolean, default: true, desc: 'Include projects shared to this group'
optional :include_subgroups, type: Boolean, default: false, desc: 'Includes projects in subgroups of this group'
+ optional :min_access_level, type: Integer, values: Gitlab::Access.all_values, desc: 'Limit by minimum access level of authenticated user on projects'
use :pagination
use :with_custom_attributes