summaryrefslogtreecommitdiff
path: root/app/views/projects/_home_panel.html.haml
diff options
context:
space:
mode:
authorJames Clark <james@jameshclrk.com>2017-04-07 23:21:16 +0100
committerJames Clark <james@jameshclrk.com>2017-05-07 11:26:52 -0400
commitc0632f1463f9d9b9afd67df3d216511463a1cc8e (patch)
tree2269b0d9f61b6c9fd71240ed01ea595be7f615b2 /app/views/projects/_home_panel.html.haml
parent6ad3814e1b31bfacfae7a2aabb4e4607b12ca66f (diff)
downloadgitlab-ce-c0632f1463f9d9b9afd67df3d216511463a1cc8e.tar.gz
Hide clone panel and file list when user is only a guest
Fixes gitlab-org/gitlab-ce#17489 Fix test finding two of the same element Capybara will raise an exception because it finds two elements that match .nav-links. This means this test would fail, even if the page meets the conditions for passing the test. Add more tests for guest access
Diffstat (limited to 'app/views/projects/_home_panel.html.haml')
-rw-r--r--app/views/projects/_home_panel.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml
index 0fd19780570..9a9fca78df3 100644
--- a/app/views/projects/_home_panel.html.haml
+++ b/app/views/projects/_home_panel.html.haml
@@ -24,7 +24,7 @@
= render 'projects/buttons/fork'
%span.hidden-xs
- - if @project.feature_available?(:repository, current_user)
+ - if can?(current_user, :download_code, @project)
.project-clone-holder
= render "shared/clone_panel"