summaryrefslogtreecommitdiff
path: root/app/finders
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 /app/finders
parentd6e5299fb696ff4aae8bb78b28542f2c87a53dba (diff)
downloadgitlab-ce-b359d5d57f4b836c04e9e2ef7e1fcb3775bd5305.tar.gz
Fix groups API to list only user's accessible projects
Closes #17496
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