diff options
author | Rémy Coutable <remy@rymai.me> | 2017-06-21 16:08:22 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-06-21 16:08:22 +0300 |
commit | cf3cdd48bb4959cb277752a16a4b98b7f4a4f3c4 (patch) | |
tree | 98100b28aa82f0a73455f7837572dc8c27222939 /app/views | |
parent | f96562b107b876d7814bef2ed2acc6b5d06638e2 (diff) | |
parent | 1d85cc462b69976962918bc16d06671b77706960 (diff) |
Merge branch '33837-remove-trash-on-registry-image' into 'master'
Remove registry image delete button if user cant delete it
Closes #33837
See merge request !12317
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/registry/repositories/_image.html.haml | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/app/views/projects/registry/repositories/_image.html.haml b/app/views/projects/registry/repositories/_image.html.haml index 8bc78f8d018..dcdc432b654 100644 --- a/app/views/projects/registry/repositories/_image.html.haml +++ b/app/views/projects/registry/repositories/_image.html.haml @@ -6,13 +6,14 @@ = clipboard_button(clipboard_text: "docker pull #{image.location}") - .controls.hidden-xs.pull-right - = link_to namespace_project_container_registry_path(@project.namespace, @project, image), - class: 'btn btn-remove has-tooltip', - title: 'Remove repository', - data: { confirm: 'Are you sure?' }, - method: :delete do - = icon('trash cred', 'aria-hidden': 'true') + - if can?(current_user, :update_container_image, @project) + .controls.hidden-xs.pull-right + = link_to namespace_project_container_registry_path(@project.namespace, @project, image), + class: 'btn btn-remove has-tooltip', + title: 'Remove repository', + data: { confirm: 'Are you sure?' }, + method: :delete do + = icon('trash cred', 'aria-hidden': 'true') .container-image-tags.js-toggle-content.hide - if image.has_tags? |