diff options
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r-- | app/models/namespace.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb index 5abda6196c1..1f2224bba09 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -301,6 +301,14 @@ class Namespace < ApplicationRecord super || Gitlab::CurrentSettings.default_branch_protection end + def default_branch_protection_settings + settings = default_branch_protection_defaults + + return settings unless settings.blank? + + Gitlab::CurrentSettings.default_branch_protection_defaults + end + def visibility_level_field :visibility_level end |