diff options
author | Robert Speicher <robert@gitlab.com> | 2016-11-04 12:50:17 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-11-04 12:50:17 +0000 |
commit | 588bc001e27080d2583781426e2336ffa09f70e5 (patch) | |
tree | bb3b96438da32d51a4358dcfea562da57123ad33 /lib/api | |
parent | 856ef3c303574f9c6554dddf34e6bae5cfa0d4dd (diff) | |
parent | e5c6f943fe6e33510813f05a6f7e6d56af47461a (diff) | |
download | gitlab-ce-588bc001e27080d2583781426e2336ffa09f70e5.tar.gz |
Merge branch 'backport-ee-js-groups-api' into 'master'
Backport Group API code that was added in EE only
Group API code that was added in EE only. /cc @vsizov
See merge request !7205
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/groups.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb index bfb89475025..a13e353b7f5 100644 --- a/lib/api/groups.rb +++ b/lib/api/groups.rb @@ -8,11 +8,14 @@ module API # # Parameters: # skip_groups (optional) - Array of group ids to exclude from list + # all_available (optional, boolean) - Show all group that you have access to # Example Request: # GET /groups get do @groups = if current_user.admin Group.all + elsif params[:all_available] + GroupsFinder.new.execute(current_user) else current_user.groups end |