Backport some changes from EE

MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9815
This commit is contained in:
Rubén Dávila 2019-04-02 10:55:34 -05:00
parent ccdf7a9390
commit e8da6255d9
5 changed files with 11 additions and 0 deletions

View file

@ -7,5 +7,11 @@ module Groups
def initialize(group, user, params = {})
@group, @current_user, @params = group, user, params.dup
end
private
def remove_unallowed_params
# overridden in EE
end
end
end

View file

@ -8,6 +8,8 @@ module Groups
end
def execute
remove_unallowed_params
@group = Group.new(params)
after_build_hook(@group, params)

View file

@ -6,6 +6,7 @@ module Groups
def execute
reject_parent_id!
remove_unallowed_params
return false unless valid_visibility_level_change?(group, params[:visibility_level])

View file

@ -26,6 +26,7 @@ module API
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
end

View file

@ -54,6 +54,7 @@ module API
if Gitlab.ee?
optional :shared_runners_minutes_limit, type: Integer, desc: 'Pipeline minutes quota for this user'
optional :extra_shared_runners_minutes_limit, type: Integer, desc: '(admin-only) Extra pipeline minutes quota for this user'
end
end