Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2017-02-06 15:17:26 +0300
committerSean McGivern <sean@gitlab.com>2017-02-06 15:17:26 +0300
commita08bbcbc4417baf0316e77501b44e5db6d75fe9a (patch)
tree7a0cdcc765d1d0ffdcd3aedf541621b784b8036d /app/views/projects/snippets
parent572fb0be9b1d45437b7c0ed1000399657f471ec7 (diff)
Don't render snippet actions for logged-out users
Diffstat (limited to 'app/views/projects/snippets')
-rw-r--r--app/views/projects/snippets/_actions.html.haml2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/views/projects/snippets/_actions.html.haml b/app/views/projects/snippets/_actions.html.haml
index e2a5107a883..dde2e2b644d 100644
--- a/app/views/projects/snippets/_actions.html.haml
+++ b/app/views/projects/snippets/_actions.html.haml
@@ -1,3 +1,5 @@
+- return unless current_user
+
.hidden-xs
- if can?(current_user, :update_project_snippet, @snippet)
= link_to edit_namespace_project_snippet_path(@project.namespace, @project, @snippet), class: "btn btn-grouped" do