summaryrefslogtreecommitdiff
path: root/app/models/namespace.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-16 15:09:00 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-16 15:09:00 +0000
commita6533d71f53cd7f97a31100334154a82a9f37deb (patch)
tree225646046d9f101c54b7c91226c0fcf1e72005f7 /app/models/namespace.rb
parentb019dc959ec16b15fe42a680dbd729542ff61537 (diff)
downloadgitlab-ce-a6533d71f53cd7f97a31100334154a82a9f37deb.tar.gz
Add latest changes from gitlab-org/gitlab@master
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 e7bf1ff42a5..5bb06cdbb4a 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -557,6 +557,14 @@ class Namespace < ApplicationRecord
cluster_enabled_granted? || certificate_based_clusters_enabled_ff?
end
+ def enabled_git_access_protocol
+ # If the instance-level setting is enabled, we defer to that
+ return ::Gitlab::CurrentSettings.enabled_git_access_protocol unless ::Gitlab::CurrentSettings.enabled_git_access_protocol.blank?
+
+ # Otherwise we use the stored setting on the group
+ namespace_settings&.enabled_git_access_protocol
+ end
+
private
def cluster_enabled_granted?