BigW Consortium Gitlab

Commit c275c913 by Kamil Trzcinski

Change abilities from container_registry to container_image

parent f63b6fc2
class Projects::ContainerRegistryController < Projects::ApplicationController
before_action :authorize_read_container_registry!
before_action :authorize_update_container_registry!, only: [:destroy]
before_action :authorize_read_container_image!
before_action :authorize_update_container_image!, only: [:destroy]
layout 'project'
def index
......
......@@ -152,7 +152,7 @@ module ProjectsHelper
nav_tabs << :builds
end
if can?(current_user, :read_container_registry, project)
if can?(current_user, :read_container_image, project)
nav_tabs << :container_registry
end
......
......@@ -14,7 +14,7 @@
= pluralize(tag.layers.size, "layer")
%td
= 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
.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
......
......@@ -33,7 +33,7 @@
%th Image ID
%th Size
%th Created
- if can?(current_user, :update_container_registry, @project)
- if can?(current_user, :update_container_image, @project)
%th
- @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