diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-05-14 18:26:26 -0500 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-05-14 18:26:26 -0500 |
commit | c275c91373103c10dfe5e21afd6fc54a7a4dfdbe (patch) | |
tree | f1dd9d2fdedb394251081efd1da3917c36d187cc | |
parent | f63b6fc297b876e26b93c12ca510148d18d58ec2 (diff) | |
download | gitlab-ce-c275c91373103c10dfe5e21afd6fc54a7a4dfdbe.tar.gz |
Change abilities from container_registry to container_image
4 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/projects/container_registry_controller.rb b/app/controllers/projects/container_registry_controller.rb index c470789a5bb..e48f205d216 100644 --- a/app/controllers/projects/container_registry_controller.rb +++ b/app/controllers/projects/container_registry_controller.rb @@ -1,6 +1,6 @@ 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 diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 7113e28924b..466929443d6 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -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 diff --git a/app/views/projects/container_registry/_tag.html.haml b/app/views/projects/container_registry/_tag.html.haml index bf816d109b6..10eabc6cd6f 100644 --- a/app/views/projects/container_registry/_tag.html.haml +++ b/app/views/projects/container_registry/_tag.html.haml @@ -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 diff --git a/app/views/projects/container_registry/index.html.haml b/app/views/projects/container_registry/index.html.haml index 990253719bf..f3b2881ce09 100644 --- a/app/views/projects/container_registry/index.html.haml +++ b/app/views/projects/container_registry/index.html.haml @@ -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| |