summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-05-03 23:51:25 +0000
committerBob Van Landuyt <bob@gitlab.com>2017-05-10 11:10:07 +0200
commite61bfba769e41bf1028016d3e0a87ad23207ec0f (patch)
tree25def021dc09ddef4ad32a46d177d432c5020bfd /lib
parent39eee5babd279d0c8f46a173a47f98d2fe1a0cbc (diff)
downloadgitlab-ce-e61bfba769e41bf1028016d3e0a87ad23207ec0f.tar.gz
Merge branch 'tc-fix-private-subgroups-shown' into 'security'
Use GroupsFinder to find subgroups the user has access to See merge request !2096
Diffstat (limited to 'lib')
-rw-r--r--lib/api/groups.rb2
-rw-r--r--lib/api/v3/groups.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb
index 09d105f6b4c..9ccc75681f9 100644
--- a/lib/api/groups.rb
+++ b/lib/api/groups.rb
@@ -52,7 +52,7 @@ module API
elsif current_user.admin
Group.all
elsif params[:all_available]
- GroupsFinder.new.execute(current_user)
+ GroupsFinder.new(current_user).execute
else
current_user.groups
end
diff --git a/lib/api/v3/groups.rb b/lib/api/v3/groups.rb
index 63d464b926b..dbf7a3cf785 100644
--- a/lib/api/v3/groups.rb
+++ b/lib/api/v3/groups.rb
@@ -45,7 +45,7 @@ module API
groups = if current_user.admin
Group.all
elsif params[:all_available]
- GroupsFinder.new.execute(current_user)
+ GroupsFinder.new(current_user).execute
else
current_user.groups
end