summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-05-12 16:12:05 +0000
committerRémy Coutable <remy@rymai.me>2016-05-12 16:12:05 +0000
commit7a5fbb493810c23a4bfb34909bfe311c6b265873 (patch)
treecb599533c8a4438604f2a7c0bbfb183956beb6c3 /app
parent66824e09e23648923fea061e956c4c7a16730c75 (diff)
parent827fbc10f6147c3c86278ed7f1675b085cc2a3cb (diff)
downloadgitlab-ce-7a5fbb493810c23a4bfb34909bfe311c6b265873.tar.gz
Merge branch '14272-forks-listed-when-permission-is-missing' into 'master'
Only show forks for users who can download code The ForksController enforces this, so don't show the link if it won't go anywhere. Closes #14272. See merge request !4017
Diffstat (limited to 'app')
-rw-r--r--app/helpers/projects_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index 85f8854d2eb..e1ab78df69e 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -138,10 +138,10 @@ module ProjectsHelper
private
def get_project_nav_tabs(project, current_user)
- nav_tabs = [:home, :forks]
+ nav_tabs = [:home]
if !project.empty_repo? && can?(current_user, :download_code, project)
- nav_tabs << [:files, :commits, :network, :graphs]
+ nav_tabs << [:files, :commits, :network, :graphs, :forks]
end
if project.repo_exists? && can?(current_user, :read_merge_request, project)