Commit 586e2141 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents 99718db2 2a8f44d1
......@@ -64,7 +64,7 @@ export default {
<th>{{ s__('ContainerRegistry|Tag') }}</th>
<th>{{ s__('ContainerRegistry|Tag ID') }}</th>
<th>{{ s__('ContainerRegistry|Size') }}</th>
<th>{{ s__('ContainerRegistry|Created') }}</th>
<th>{{ s__('ContainerRegistry|Last Updated') }}</th>
<th></th>
</tr>
</thead>
......
......@@ -3,7 +3,7 @@
module Projects
module Registry
class TagsController < ::Projects::Registry::ApplicationController
before_action :authorize_update_container_image!, only: [:destroy]
before_action :authorize_destroy_container_image!, only: [:destroy]
def index
respond_to do |format|
......
......@@ -258,6 +258,7 @@ class ProjectPolicy < BasePolicy
enable :resolve_note
enable :create_container_image
enable :update_container_image
enable :destroy_container_image
enable :create_environment
enable :create_deployment
enable :create_release
......
---
title: Changed the 'Created' label to 'Last Updated' on the container registry table
to more accurately reflect what the date represents.
merge_request: 29464
author:
type: other
---
title: Allow developer role to delete docker tags via container registry API
merge_request: 29512
author:
type: fixed
......@@ -115,12 +115,8 @@ module API
authorize! :read_container_image, repository
end
def authorize_update_container_image!
authorize! :update_container_image, repository
end
def authorize_destroy_container_image!
authorize! :admin_container_image, repository
authorize! :destroy_container_image, repository
end
def authorize_admin_container_image!
......
......@@ -3502,9 +3502,6 @@ msgstr ""
msgid "Container registry images"
msgstr ""
msgid "ContainerRegistry|Created"
msgstr ""
msgid "ContainerRegistry|First log in to GitLab&rsquo;s Container Registry using your GitLab username and password. If you have %{link_2fa} you need to use a %{link_token}:"
msgstr ""
......@@ -3514,6 +3511,9 @@ msgstr ""
msgid "ContainerRegistry|How to use the Container Registry"
msgstr ""
msgid "ContainerRegistry|Last Updated"
msgstr ""
msgid "ContainerRegistry|Learn more about"
msgstr ""
......
......@@ -39,7 +39,7 @@ describe ProjectPolicy do
admin_milestone admin_merge_request update_merge_request create_commit_status
update_commit_status create_build update_build create_pipeline
update_pipeline create_merge_request_from create_wiki push_code
resolve_note create_container_image update_container_image
resolve_note create_container_image update_container_image destroy_container_image
create_environment create_deployment create_release update_release
]
end
......
......@@ -201,10 +201,10 @@ describe API::ContainerRegistry do
describe 'DELETE /projects/:id/registry/repositories/:repository_id/tags/:tag_name' do
subject { delete api("/projects/#{project.id}/registry/repositories/#{root_repository.id}/tags/rootA", api_user) }
it_behaves_like 'being disallowed', :developer
it_behaves_like 'being disallowed', :reporter
context 'for maintainer' do
let(:api_user) { maintainer }
context 'for developer' do
let(:api_user) { developer }
before do
stub_container_registry_tags(repository: root_repository.path, tags: %w(rootA), with_manifest: true)
......
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