summaryrefslogtreecommitdiff
path: root/spec/factories/groups.rb
diff options
context:
space:
mode:
authorFabio Papa <fabtheman@gmail.com>2019-06-30 14:40:23 -0700
committerFabio Papa <fabtheman@gmail.com>2019-07-19 11:55:48 -0700
commit81662f7b9fae45689b9291427fd9b192ef88be4b (patch)
tree161b452c8e6caa6d800f0779151bed7176208810 /spec/factories/groups.rb
parente962ffbc90b797cc9f1eb922e918c093dac7d4a1 (diff)
downloadgitlab-ce-81662f7b9fae45689b9291427fd9b192ef88be4b.tar.gz
Make subgroup_creation_level default to maintainer at SQL level
- Migration updates existing groups to "owner", then sets default to "maintainer" so that new groups will default to that - Update spec examples
Diffstat (limited to 'spec/factories/groups.rb')
-rw-r--r--spec/factories/groups.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/factories/groups.rb b/spec/factories/groups.rb
index 2f50fbfe2fa..b67ab955ffc 100644
--- a/spec/factories/groups.rb
+++ b/spec/factories/groups.rb
@@ -5,7 +5,6 @@ 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
@@ -46,5 +45,9 @@ FactoryBot.define do
trait :auto_devops_disabled do
auto_devops_enabled false
end
+
+ trait :owner_subgroup_creation_only do
+ subgroup_creation_level ::Gitlab::Access::OWNER_SUBGROUP_ACCESS
+ end
end
end