diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-02-26 17:43:07 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-02-26 17:43:07 +0000 |
commit | a325d3314950cad2297df4f10877be289e2da02e (patch) | |
tree | c789d882d26b8993d77ef7ed7de019f941054454 | |
parent | 26d6bff9a52ac08df0398495702e149004ba69e4 (diff) | |
parent | 4aaf7ca996e2dbcd6602c56d305c5ac4db36dabd (diff) | |
download | gitlab-ci-a325d3314950cad2297df4f10877be289e2da02e.tar.gz |
Merge branch 'fix_show_button' into 'master'
Hide edit btn if use does not have permissions
Fixes #159
See merge request !121
-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 |