Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorvanadium23 <chernoffivan@gmail.com>2017-06-20 21:12:46 +0300
committervanadium23 <chernoffivan@gmail.com>2017-06-21 09:27:12 +0300
commit1d85cc462b69976962918bc16d06671b77706960 (patch)
treecff143884f1dd533a1cd3dbd27db40925bd343e5 /app
parentb2e1d32e7a74b22b23e8ab052bd29e15bb8a4f1e (diff)
Remove registry image delete button if user cant delete it
Diffstat (limited to 'app')
-rw-r--r--app/views/projects/registry/repositories/_image.html.haml15
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?