Skip to content
Snippets Groups Projects
Commit 720dded1 authored by Fabio Papa's avatar Fabio Papa
Browse files

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 014e11b8
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
[
Loading
Loading
@@ -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
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment