Commit 474f3967 authored by Małgorzata Ksionek's avatar Małgorzata Ksionek

Add validations that respect new allow_mfa_for_subgroups setting

Add specs for new validation

Add validation in group

Add specs for new requires_two_factor_validation

WIP

Update validations for namespace setting
parent 14f3df00
...@@ -7,6 +7,7 @@ FactoryBot.define do ...@@ -7,6 +7,7 @@ FactoryBot.define do
type { 'Group' } type { 'Group' }
owner { nil } owner { nil }
project_creation_level { ::Gitlab::Access::MAINTAINER_PROJECT_ACCESS } project_creation_level { ::Gitlab::Access::MAINTAINER_PROJECT_ACCESS }
association :namespace_settings, factory: :namespace_settings
after(:create) do |group| after(:create) do |group|
if group.owner if group.owner
...@@ -23,7 +24,7 @@ FactoryBot.define do ...@@ -23,7 +24,7 @@ FactoryBot.define do
end end
trait :internal do trait :internal do
visibility_level {Gitlab::VisibilityLevel::INTERNAL } visibility_level { Gitlab::VisibilityLevel::INTERNAL }
end end
trait :private do trait :private do
......
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