summaryrefslogtreecommitdiff
path: root/app/views/projects/buttons/_fork.html.haml
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-09-29 12:14:39 +0100
committerPhil Hughes <me@iamphill.com>2017-09-29 12:14:39 +0100
commit93aa6d04c2e81193d7833890d2281fc1df7d7129 (patch)
tree166a52d9ffdf1bbd3ef073b88626707e9a1acc16 /app/views/projects/buttons/_fork.html.haml
parent8585ae61e730a48fc0688417b24279c48b59dada (diff)
downloadgitlab-ce-93aa6d04c2e81193d7833890d2281fc1df7d7129.tar.gz
moved fork checks into policiesfork-btn-enabled-user-groups
Diffstat (limited to 'app/views/projects/buttons/_fork.html.haml')
-rw-r--r--app/views/projects/buttons/_fork.html.haml6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/views/projects/buttons/_fork.html.haml b/app/views/projects/buttons/_fork.html.haml
index 840b5ce1f84..f880556a9f7 100644
--- a/app/views/projects/buttons/_fork.html.haml
+++ b/app/views/projects/buttons/_fork.html.haml
@@ -5,10 +5,10 @@
= custom_icon('icon_fork')
%span= s_('GoToYourFork|Fork')
- else
- - can_fork = current_user.can_create_project? || current_user.manageable_namespaces.count > 1
+ - can_create_fork = current_user.can?(:create_fork)
= link_to new_project_fork_path(@project),
- class: "btn btn-default #{'has-tooltip disabled' unless can_fork}",
- title: (_('You have reached your project limit') unless can_fork) do
+ class: "btn btn-default #{'has-tooltip disabled' unless can_create_fork}",
+ title: (_('You have reached your project limit') unless can_create_fork) do
= custom_icon('icon_fork')
%span= s_('CreateNewFork|Fork')
.count-with-arrow