summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorAndrew8xx8 <avk@8xx8.ru>2013-03-25 14:22:14 +0400
committerAndrew8xx8 <avk@8xx8.ru>2013-03-25 14:22:14 +0400
commite3351287b4284af95390835bc75a6c3c461f04ba (patch)
treefa9d25a07359e3deae8ed29beaa6f3f32f933749 /app/views
parent033037a059c9229df310e3508f9c50beb676bf00 (diff)
downloadgitlab-ce-e3351287b4284af95390835bc75a6c3c461f04ba.tar.gz
Permissions for Project Snippet fixed
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/snippets/index.html.haml2
-rw-r--r--app/views/projects/snippets/show.html.haml2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/projects/snippets/index.html.haml b/app/views/projects/snippets/index.html.haml
index 12760d377f3..5971e3ffaac 100644
--- a/app/views/projects/snippets/index.html.haml
+++ b/app/views/projects/snippets/index.html.haml
@@ -2,7 +2,7 @@
Snippets
%small share code pastes with others out of git repository
- - if can? current_user, :write_snippet, @project
+ - if can? current_user, :write_project_snippet, @project
= link_to new_project_snippet_path(@project), class: "btn btn-small add_new pull-right", title: "New Snippet" do
Add new snippet
%br
diff --git a/app/views/projects/snippets/show.html.haml b/app/views/projects/snippets/show.html.haml
index e325c3d84e6..db5a721dc45 100644
--- a/app/views/projects/snippets/show.html.haml
+++ b/app/views/projects/snippets/show.html.haml
@@ -1,7 +1,7 @@
%h3.page_title
= @snippet.title
%small= @snippet.file_name
- - if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user
+ - if can?(current_user, :admin_project_snippet, @project) || @snippet.author == current_user
= link_to "Edit", edit_project_snippet_path(@project, @snippet), class: "btn btn-small pull-right", title: 'Edit Snippet'
%br