diff --git a/app/controllers/katello/api/registry/registry_proxies_controller.rb b/app/controllers/katello/api/registry/registry_proxies_controller.rb index fa21f42727c..3f6f56e3fc3 100644 --- a/app/controllers/katello/api/registry/registry_proxies_controller.rb +++ b/app/controllers/katello/api/registry/registry_proxies_controller.rb @@ -84,7 +84,6 @@ def registry_authorize def container_push_prop_validation(props = nil) # Handle validation and repo creation for container pushes before talking to pulp - return false unless confirm_push_settings props = parse_blob_push_props if props.nil? return false unless check_blob_push_field_syntax(props) @@ -774,15 +773,6 @@ def confirm_settings :locals => { :message => "Registry not configured" }) end - def confirm_push_settings - return true if SETTINGS.dig(:katello, :container_image_registry, :allow_push) - render_podman_error( - "UNSUPPORTED", - _("Registry push is not enabled. To enable, add ':katello:'->':container_image_registry:'->':allow_push: true' in the katello settings file."), - :unprocessable_entity - ) - end - def request_url request.protocol + request.host_with_port end diff --git a/test/controllers/api/registry/registry_proxies_controller_test.rb b/test/controllers/api/registry/registry_proxies_controller_test.rb index 098699b9535..c5ba3a7a9a1 100644 --- a/test/controllers/api/registry/registry_proxies_controller_test.rb +++ b/test/controllers/api/registry/registry_proxies_controller_test.rb @@ -29,7 +29,6 @@ def setup_permissions setup_permissions setup_controller_defaults_api - SETTINGS[:katello][:container_image_registry] = {crane_url: 'https://localhost:5000', crane_ca_cert_file: '/etc/pki/katello/certs/katello-default-ca.crt', allow_push: true} File.delete("#{Rails.root}/tmp/manifest.json") if File.exist?("#{Rails.root}/tmp/manifest.json") end