Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r--app/models/namespace.rb8
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