Commit 302316da authored by Fabio Papa's avatar Fabio Papa

Add examples specing the setting to choose who can create subgroups

This setting is at the group level only. The default is specified to
be maintainers and owners.

**Specs only**, all failing.
parent 0c031480
......@@ -5,6 +5,7 @@ FactoryBot.define do
type 'Group'
owner nil
project_creation_level ::Gitlab::Access::MAINTAINER_PROJECT_ACCESS
subgroup_creation_level ::Gitlab::Access::OWNER_SUBGROUP_ACCESS
after(:create) do |group|
if group.owner
......
......@@ -19,15 +19,10 @@ RSpec.shared_context 'GroupPolicy context' do
let(:reporter_permissions) { [:admin_label] }
let(:developer_permissions) { [:admin_milestone] }
let(:maintainer_permissions) do
[
:create_projects,
:read_cluster,
:create_cluster,
:update_cluster,
:admin_cluster,
:add_cluster,
(Gitlab::Database.postgresql? ? :create_subgroup : nil)
].compact
%i[
create_projects
read_cluster create_cluster update_cluster admin_cluster add_cluster
]
end
let(:owner_permissions) do
[
......@@ -35,7 +30,8 @@ RSpec.shared_context 'GroupPolicy context' do
:admin_namespace,
:admin_group_member,
:change_visibility_level,
:set_note_created_at
:set_note_created_at,
(Gitlab::Database.postgresql? ? :create_subgroup : nil)
].compact
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment