summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-05-25 20:28:17 +0000
committerDouwe Maan <douwe@gitlab.com>2016-05-25 20:28:17 +0000
commit997178220008696576ffb5cdee6cb9d0e7a44055 (patch)
treeb2476fed3952a8df889995756d2c172adb50013f /app/finders
parent7fa1ab469f40dfced988a75b95e484e40615e32d (diff)
parentb359d5d57f4b836c04e9e2ef7e1fcb3775bd5305 (diff)
downloadgitlab-ce-997178220008696576ffb5cdee6cb9d0e7a44055.tar.gz
Merge branch 'fix-issue-17496' into 'master'
Fix groups API to list only user's accessible projects Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/17496 See merge request !1966
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/group_projects_finder.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/finders/group_projects_finder.rb b/app/finders/group_projects_finder.rb
index 3b9a421b118..aa8f4c1d0e4 100644
--- a/app/finders/group_projects_finder.rb
+++ b/app/finders/group_projects_finder.rb
@@ -18,7 +18,7 @@ class GroupProjectsFinder < UnionFinder
projects = []
if current_user
- if @group.users.include?(current_user)
+ if @group.users.include?(current_user) || current_user.admin?
projects << @group.projects unless only_shared
projects << @group.shared_projects unless only_owned
else