Backport some changes from EE
MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9815
This commit is contained in:
parent
ccdf7a9390
commit
e8da6255d9
5 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -8,6 +8,8 @@ module Groups
|
|||
end
|
||||
|
||||
def execute
|
||||
remove_unallowed_params
|
||||
|
||||
@group = Group.new(params)
|
||||
|
||||
after_build_hook(@group, params)
|
||||
|
|
|
@ -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])
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue