Skip to content
Snippets Groups Projects
Commit d890c6e8 authored by Jean Praloran's avatar Jean Praloran
Browse files

fix typo and check

parent 6c9da292
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -122,7 +122,7 @@ module Auth
(requested_project == project || can?(current_user, :build_read_container_image, requested_project))
end
 
def user_can_delete(requested_project)
def user_can_delete?(requested_project)
has_authentication_ability?(:admin_container_image) &&
can?(current_user, :admin_container_image, requested_project)
end
Loading
Loading
Loading
Loading
@@ -278,7 +278,6 @@ describe Auth::ContainerRegistryAuthenticationService, services: true do
it_behaves_like 'an inaccessible'
it_behaves_like 'not a container repository factory'
end
end
end
 
Loading
Loading
@@ -287,15 +286,10 @@ describe Auth::ContainerRegistryAuthenticationService, services: true do
let(:current_user) { create(:user) }
let(:authentication_abilities) do
[
:build_read_container_image,
:build_create_container_image
:admin_container_image
]
end
 
before do
current_project.team << [current_project, :admin]
end
it_behaves_like 'a valid token'
 
context 'allow to delete images' do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment