summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-02-26 13:09:10 +0200
committerValery Sizov <vsv2711@gmail.com>2015-02-26 13:09:10 +0200
commit4aaf7ca996e2dbcd6602c56d305c5ac4db36dabd (patch)
tree7b50dc174640d4bbc3c283ff723f3060d7e04efa
parenta7d4aa5a4ab90ad2a6ab800437bacb21a4a26f2b (diff)
downloadgitlab-ci-4aaf7ca996e2dbcd6602c56d305c5ac4db36dabd.tar.gz
Hide edit btn if use does not have permissions
-rw-r--r--app/views/commits/show.html.haml9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/views/commits/show.html.haml b/app/views/commits/show.html.haml
index 184cf27..578f518 100644
--- a/app/views/commits/show.html.haml
+++ b/app/views/commits/show.html.haml
@@ -2,10 +2,11 @@
= @project.name
@
#{gitlab_commit_link(@project, @commit.sha)}
- .pull-right
- = link_to project_jobs_path(@project), class: "btn btn-default btn-small" do
- %i.icon-edit.icon-white
- Edit Job
+ - if current_user.can_manage_project?(@project.gitlab_id)
+ .pull-right
+ = link_to project_jobs_path(@project), class: "btn btn-default btn-small" do
+ %i.icon-edit.icon-white
+ Edit Job
%p
= link_to project_path(@project) do