Add "allowed to create subgroups" dropdown to group settings form
This commit is contained in:
parent
d279cc5a7a
commit
9dc5c2ef73
3 changed files with 11 additions and 0 deletions
|
@ -20,6 +20,7 @@
|
|||
= render_if_exists 'groups/settings/ip_restriction', f: f, group: @group
|
||||
= render 'groups/settings/lfs', f: f
|
||||
= render 'groups/settings/project_creation_level', f: f, group: @group
|
||||
= render 'groups/settings/subgroup_creation_level', f: f, group: @group
|
||||
= render 'groups/settings/two_factor_auth', f: f
|
||||
= render_if_exists 'groups/member_lock_setting', f: f, group: @group
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
.form-group
|
||||
= f.label s_('SubgroupCreationLevel|Allowed to create subgroups'), class: 'label-bold'
|
||||
= f.select :subgroup_creation_level, options_for_select(::Gitlab::Access.subgroup_creation_options, group.subgroup_creation_level), {}, class: 'form-control'
|
|
@ -110,6 +110,13 @@ module Gitlab
|
|||
def project_creation_level_name(name)
|
||||
project_creation_options.key(name)
|
||||
end
|
||||
|
||||
def subgroup_creation_options
|
||||
{
|
||||
s_('SubgroupCreationlevel|Owners') => OWNER_SUBGROUP_ACCESS,
|
||||
s_('SubgroupCreationlevel|Maintainers') => MAINTAINER_SUBGROUP_ACCESS
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
def human_access
|
||||
|
|
Loading…
Reference in a new issue