diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml
index 14d1ad956e3b569b5804d32472b33b8dfff3189e..af6e4567c1b7c10e5dcd7b07df79e0f8b4d435aa 100644
--- a/app/views/projects/show.html.haml
+++ b/app/views/projects/show.html.haml
@@ -1,4 +1,4 @@
-- if can?(current_user, :download_code, @project)
+- if current_user && can?(current_user, :download_code, @project)
   = render 'shared/no_ssh'
 
 = render "home_panel"