Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Koller <markus-koller@gmx.ch>2017-09-18 18:07:38 +0300
committerMarkus Koller <markus.koller.ext@siemens.com>2017-11-06 12:51:50 +0300
commit1f773a8ef5a1f76166d0455c6a5e473278885c17 (patch)
treeed2d955865b49aa5d102ccb4b4f64868d4d12b77 /lib/api/groups.rb
parent6902848a9c54f9eb1bfd82fe173ad0d5d62fe2d5 (diff)
Support custom attributes on groups
Diffstat (limited to 'lib/api/groups.rb')
-rw-r--r--lib/api/groups.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb
index e817dcbbc4b..340a7cecf09 100644
--- a/lib/api/groups.rb
+++ b/lib/api/groups.rb
@@ -37,6 +37,8 @@ module API
end
resource :groups do
+ include CustomAttributesEndpoints
+
desc 'Get a groups list' do
success Entities::Group
end
@@ -51,7 +53,12 @@ module API
use :pagination
end
get do
- find_params = { all_available: params[:all_available], owned: params[:owned] }
+ find_params = {
+ all_available: params[:all_available],
+ owned: params[:owned],
+ custom_attributes: params[:custom_attributes]
+ }
+
groups = GroupsFinder.new(current_user, find_params).execute
groups = groups.search(params[:search]) if params[:search].present?
groups = groups.where.not(id: params[:skip_groups]) if params[:skip_groups].present?