diff options
author | Rémy Coutable <remy@rymai.me> | 2016-10-31 18:37:13 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-10-31 18:47:30 +0100 |
commit | e5c6f943fe6e33510813f05a6f7e6d56af47461a (patch) | |
tree | d93062daf78ef0179cf96c071cdb999e0ccca74e /lib/api/groups.rb | |
parent | a60cc42b262cb63ce5d2284f1f3f41d6521daa14 (diff) | |
download | gitlab-ce-e5c6f943fe6e33510813f05a6f7e6d56af47461a.tar.gz |
Backport Group API code that was added in EE onlybackport-ee-js-groups-api
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/api/groups.rb')
-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 |