diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-02-26 13:09:10 +0200 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-02-26 13:09:10 +0200 |
commit | 4aaf7ca996e2dbcd6602c56d305c5ac4db36dabd (patch) | |
tree | 7b50dc174640d4bbc3c283ff723f3060d7e04efa | |
parent | a7d4aa5a4ab90ad2a6ab800437bacb21a4a26f2b (diff) | |
download | gitlab-ci-4aaf7ca996e2dbcd6602c56d305c5ac4db36dabd.tar.gz |
Hide edit btn if use does not have permissions
-rw-r--r-- | app/views/commits/show.html.haml | 9 |
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 |