Commit dd4171eb authored by Robert Speicher's avatar Robert Speicher

Merge branch 'issue_13369' into 'master'

Don't show fork button if user can't fork the project.

Fixes #13369 

See merge request !2793
parents 67fefe0e 4d1e82e0
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
= link_to page_filter_path(sort: sort_value_oldest_updated, without: excluded_filters) do = link_to page_filter_path(sort: sort_value_oldest_updated, without: excluded_filters) do
= sort_title_oldest_updated = sort_title_oldest_updated
- if current_user && can?(current_user, :fork_project, @project)
- if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2 - if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2
= link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: 'Go to your fork', class: 'btn btn-new' do = link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: 'Go to your fork', class: 'btn btn-new' do
= icon('code-fork fw') = icon('code-fork fw')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment