Commit c275c913 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Change abilities from container_registry to container_image

parent f63b6fc2
class Projects::ContainerRegistryController < Projects::ApplicationController class Projects::ContainerRegistryController < Projects::ApplicationController
before_action :authorize_read_container_registry! before_action :authorize_read_container_image!
before_action :authorize_update_container_registry!, only: [:destroy] before_action :authorize_update_container_image!, only: [:destroy]
layout 'project' layout 'project'
def index def index
......
...@@ -152,7 +152,7 @@ module ProjectsHelper ...@@ -152,7 +152,7 @@ module ProjectsHelper
nav_tabs << :builds nav_tabs << :builds
end end
if can?(current_user, :read_container_registry, project) if can?(current_user, :read_container_image, project)
nav_tabs << :container_registry nav_tabs << :container_registry
end end
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
= pluralize(tag.layers.size, "layer") = pluralize(tag.layers.size, "layer")
%td %td
= time_ago_in_words(tag.created_at) = time_ago_in_words(tag.created_at)
- if can?(current_user, :update_container_registry, @project) - if can?(current_user, :update_container_image, @project)
%td.content %td.content
.controls.hidden-xs.pull-right .controls.hidden-xs.pull-right
= link_to namespace_project_container_registry_path(@project.namespace, @project, tag.name), class: 'btn btn-remove has-tooltip', title: "Remove", data: { confirm: "Are you sure?" }, method: :delete do = link_to namespace_project_container_registry_path(@project.namespace, @project, tag.name), class: 'btn btn-remove has-tooltip', title: "Remove", data: { confirm: "Are you sure?" }, method: :delete do
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
%th Image ID %th Image ID
%th Size %th Size
%th Created %th Created
- if can?(current_user, :update_container_registry, @project) - if can?(current_user, :update_container_image, @project)
%th %th
- @tags.each do |tag| - @tags.each do |tag|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment