summaryrefslogtreecommitdiff
path: root/lib/api/groups.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-11-07 10:59:38 +0000
committerRémy Coutable <remy@rymai.me>2017-11-07 10:59:38 +0000
commit31e3ef93e53802bb99b342a7b403972493ed63cc (patch)
tree150d4328b00f71c2f28f7a58003b73e3d0548b5c /lib/api/groups.rb
parent2ec5ae21b8ab16bea83c4b00df5bf17be8ad34c6 (diff)
parent1f773a8ef5a1f76166d0455c6a5e473278885c17 (diff)
downloadgitlab-ce-31e3ef93e53802bb99b342a7b403972493ed63cc.tar.gz
Merge branch 'feature/custom-attributes-on-projects-and-groups' into 'master'
Support custom attributes on groups and projects See merge request gitlab-org/gitlab-ce!14593
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?