diff options
author | Lukas Eipert <leipert@gitlab.com> | 2018-06-20 16:38:42 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-06-20 16:38:42 +0000 |
commit | a7ed65f54902a9c8e3d2b7f238dd6608429886bc (patch) | |
tree | 30c1477730afb7138f50e4110ddb410ae04eaba3 /app/helpers | |
parent | 88ceef87e3d2d9a0829679b6da9b970c4eff9ab4 (diff) | |
download | gitlab-ce-a7ed65f54902a9c8e3d2b7f238dd6608429886bc.tar.gz |
Backport code from gitlab-ee!6182
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/projects_helper.rb | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index c405e6d117f..be3958c40a4 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 @@ -501,4 +505,37 @@ module ProjectsHelper "list-label" end end + + def sidebar_settings_paths + %w[ + projects#edit + project_members#index + integrations#show + services#edit + repository#show + ci_cd#show + badges#index + pages#show + ] + end + + def sidebar_repository_paths + %w[ + tree + blob + blame + edit_tree + new_tree + find_file + commit + commits + compare + projects/repositories + tags + branches + releases + graphs + network + ] + end end |