diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2019-03-20 17:33:45 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2019-03-26 14:18:28 +0100 |
commit | c3b24826d1b782ea01767dce32702523d9163e2f (patch) | |
tree | dd5212204faecc676cd2f7a486856b5a4d25138f /lib/api | |
parent | a5c54bac4446c8c261fe1c900cf92e8d110e3301 (diff) | |
download | gitlab-ce-c3b24826d1b782ea01767dce32702523d9163e2f.tar.gz |
Backport EE API parameters for API::Groups
This backports the API parameters for API::Groups from EE to CE,
ensuring both implementations use the same code. EE specific parameters
are wrapped in an `if` statement for two reasons:
1. It allows us to completely disable the parameters in CE.
2. It removes the need for adding a source comment to signal that the
parameters are EE only.
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/groups.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb index cb0d6d96f29..9fcf476f537 100644 --- a/lib/api/groups.rb +++ b/lib/api/groups.rb @@ -20,8 +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' + all_or_none_of :ldap_cn, :ldap_access + end + end + params :optional_params do use :optional_params_ce + use :optional_params_ee if Gitlab.ee? end params :statistics_params do @@ -164,6 +175,10 @@ 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 end put ':id' do group = find_group!(params[:id]) |