summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Eipert <leipert@gitlab.com>2018-06-20 08:06:39 +0200
committerLukas Eipert <leipert@gitlab.com>2018-06-20 08:06:39 +0200
commit3e2baf1e427b1f72fc59e38b6e5a08d3143f3b19 (patch)
tree64463bde8524a33145a596116d59b1af249cd8ba
parent85b3e8dc49150cddbcf5f5ca712e4cb345cea5a3 (diff)
downloadgitlab-ce-3e2baf1e427b1f72fc59e38b6e5a08d3143f3b19.tar.gz
separate default_clone_protocol to make it easily extensible6165-migrate-ee-specific-code
-rw-r--r--app/helpers/projects_helper.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index 9bf10a5ac99..8688a18f1c4 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -350,11 +350,15 @@ module ProjectsHelper
if allowed_protocols_present?
enabled_protocol
else
- if !current_user || current_user.require_ssh_key?
- gitlab_config.protocol
- else
- 'ssh'
- end
+ extra_default_clone_protocol
+ end
+ end
+
+ def extra_default_clone_protocol
+ if !current_user || current_user.require_ssh_key?
+ gitlab_config.protocol
+ else
+ 'ssh'
end
end