summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorImre Farkas <ifarkas@gitlab.com>2019-05-10 14:51:50 -0500
committerImre Farkas <ifarkas@gitlab.com>2019-05-10 14:51:50 -0500
commit81d06ebdaf7d66623f76e7609ef8e3340ac34295 (patch)
tree313d6f86a717c2c2e1efec189f5b4750bb556740
parent712dccd4c0f37b9fce12f5a945a551f8dca07cc4 (diff)
downloadgitlab-ce-if-10137-ee_specific_lines_groups_api.tar.gz
Move EE specific lines in API::Groupsif-10137-ee_specific_lines_groups_api
-rw-r--r--lib/api/groups.rb24
-rw-r--r--lib/api/helpers/groups_helpers.rb9
2 files changed, 19 insertions, 14 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb
index ad16f26f5cc..6893c8c40be 100644
--- a/lib/api/groups.rb
+++ b/lib/api/groups.rb
@@ -20,20 +20,19 @@ module API
optional :share_with_group_lock, type: Boolean, desc: 'Prevent sharing a project with another group within this group'
end
- if Gitlab.ee?
- params :optional_params_ee do
- optional :membership_lock, type: Boolean, desc: 'Prevent adding new members to project membership within this group'
- optional :ldap_cn, type: String, desc: 'LDAP Common Name'
- optional :ldap_access, type: Integer, desc: 'A valid access level'
- optional :shared_runners_minutes_limit, type: Integer, desc: '(admin-only) Pipeline minutes quota for this group'
- optional :extra_shared_runners_minutes_limit, type: Integer, desc: '(admin-only) Extra pipeline minutes quota for this group'
- all_or_none_of :ldap_cn, :ldap_access
- end
+ params :optional_params_ee do
+ end
+
+ params :optional_update_params_ee do
end
+ end
+ include ::API::Helpers::GroupsHelpers
+
+ helpers do
params :optional_params do
use :optional_params_ce
- use :optional_params_ee if Gitlab.ee?
+ use :optional_params_ee
end
params :statistics_params do
@@ -176,10 +175,7 @@ module API
optional :name, type: String, desc: 'The name of the group'
optional :path, type: String, desc: 'The path of the group'
use :optional_params
-
- if Gitlab.ee?
- optional :file_template_project_id, type: Integer, desc: 'The ID of a project to use for custom templates in this group'
- end
+ use :optional_update_params_ee
end
put ':id' do
group = find_group!(params[:id])
diff --git a/lib/api/helpers/groups_helpers.rb b/lib/api/helpers/groups_helpers.rb
new file mode 100644
index 00000000000..ae677547760
--- /dev/null
+++ b/lib/api/helpers/groups_helpers.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+module API
+ module Helpers
+ module GroupsHelpers
+ extend ActiveSupport::Concern
+ end
+ end
+end