summaryrefslogtreecommitdiff
path: root/app/helpers/application_settings_helper.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-01-03 13:17:44 -0800
committerStan Hu <stanhu@gmail.com>2019-01-03 13:41:39 -0800
commit913084e6a3147fb55e66fc38b230f1166b7e9f8b (patch)
tree7838412b75be6d9a2ab4396a21796287fe8e6a48 /app/helpers/application_settings_helper.rb
parent0e20c8eb8b71eaa71fbfd5dedf6ccd6492531e14 (diff)
downloadgitlab-ce-913084e6a3147fb55e66fc38b230f1166b7e9f8b.tar.gz
Fix clone URL not showing if protocol is HTTPSsh-fix-clone-url-for-https
GitLab 11.6.2 fixed the case for HTTP. However, HTTPS still did not work because the protocol returned to `http_enabled?` was the actual protocol in use (e.g. `https` instead of `http`). Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/55896
Diffstat (limited to 'app/helpers/application_settings_helper.rb')
-rw-r--r--app/helpers/application_settings_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb
index 5a7c005fd06..c8e4e2e3df9 100644
--- a/app/helpers/application_settings_helper.rb
+++ b/app/helpers/application_settings_helper.rb
@@ -20,7 +20,7 @@ module ApplicationSettingsHelper
def enabled_protocol
case Gitlab::CurrentSettings.enabled_git_access_protocol
when 'http'
- gitlab_config.protocol
+ Gitlab.config.gitlab.protocol
when 'ssh'
'ssh'
end
@@ -35,7 +35,7 @@ module ApplicationSettingsHelper
end
def http_enabled?
- all_protocols_enabled? || enabled_protocol == 'http'
+ all_protocols_enabled? || Gitlab::CurrentSettings.enabled_git_access_protocol == 'http'
end
def enabled_project_button(project, protocol)