summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-05-24 17:55:57 -0700
committerStan Hu <stanhu@gmail.com>2016-05-24 18:14:12 -0700
commitb359d5d57f4b836c04e9e2ef7e1fcb3775bd5305 (patch)
treeb42616e6cfb255ba085c60c7e8e26fe014f4ddd9 /lib
parentd6e5299fb696ff4aae8bb78b28542f2c87a53dba (diff)
downloadgitlab-ce-b359d5d57f4b836c04e9e2ef7e1fcb3775bd5305.tar.gz
Fix groups API to list only user's accessible projects
Closes #17496
Diffstat (limited to 'lib')
-rw-r--r--lib/api/groups.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb
index 91e420832f3..9d8b8d737a9 100644
--- a/lib/api/groups.rb
+++ b/lib/api/groups.rb
@@ -95,8 +95,7 @@ module API
# GET /groups/:id/projects
get ":id/projects" do
group = find_group(params[:id])
- projects = group.projects
- projects = filter_projects(projects)
+ projects = GroupProjectsFinder.new(group).execute(current_user)
projects = paginate projects
present projects, with: Entities::Project
end