summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-05-03 13:58:50 +0100
committerSean McGivern <sean@gitlab.com>2016-05-12 16:22:02 +0100
commit827fbc10f6147c3c86278ed7f1675b085cc2a3cb (patch)
tree58fad027450e7873f583a9b5eb726e7f60e1cc17
parentf4a1ac23977afbb8509ca3e0221351ad9b6187de (diff)
downloadgitlab-ce-827fbc10f6147c3c86278ed7f1675b085cc2a3cb.tar.gz
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.
-rw-r--r--CHANGELOG1
-rw-r--r--app/helpers/projects_helper.rb4
2 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 187011c6016..878453e861b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -32,6 +32,7 @@ v 8.8.0 (unreleased)
- Backport GitHub Enterprise import support from EE
- Create tags using Rugged for performance reasons. !3745
- API: Expose Issue#user_notes_count. !3126 (Anton Popov)
+ - Don't show forks button when user can't view forks
- Files over 5MB can only be viewed in their raw form, files over 1MB without highlighting !3718
- Add support for supressing text diffs using .gitattributes on the default branch (Matt Oakes)
- Add eager load paths to help prevent dependency load issues in Sidekiq workers. !3724
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)