katello 4.15.0 → 4.16.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/katello/common/katello_object.js +2 -2
- data/app/assets/javascripts/katello/locale/bn/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/bn_IN/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/ca/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/cs/katello.js +521 -536
- data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +253 -268
- data/app/assets/javascripts/katello/locale/de/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/de_AT/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/de_DE/katello.js +249 -264
- data/app/assets/javascripts/katello/locale/el/katello.js +251 -266
- data/app/assets/javascripts/katello/locale/en/katello.js +253 -268
- data/app/assets/javascripts/katello/locale/en_GB/katello.js +263 -278
- data/app/assets/javascripts/katello/locale/en_US/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/es/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/et_EE/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/fr/katello.js +250 -265
- data/app/assets/javascripts/katello/locale/gl/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/gu/katello.js +249 -264
- data/app/assets/javascripts/katello/locale/he_IL/katello.js +249 -264
- data/app/assets/javascripts/katello/locale/hi/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/id/katello.js +261 -275
- data/app/assets/javascripts/katello/locale/it/katello.js +252 -267
- data/app/assets/javascripts/katello/locale/ja/katello.js +250 -265
- data/app/assets/javascripts/katello/locale/ka/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/kn/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/ko/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/ml_IN/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/mr/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/nl_NL/katello.js +252 -267
- data/app/assets/javascripts/katello/locale/or/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/pa/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/pl/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/pl_PL/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/pt/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/pt_BR/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/ro/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/ro_RO/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/ru/katello.js +253 -268
- data/app/assets/javascripts/katello/locale/sl/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/sv_SE/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/ta/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/ta_IN/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/te/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/tr/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/vi/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/vi_VN/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/zh/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/zh_CN/katello.js +250 -265
- data/app/assets/javascripts/katello/locale/zh_TW/katello.js +255 -270
- data/app/assets/javascripts/katello/sync_management/sync_management.js +16 -2
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +33 -9
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -1
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +4 -9
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +2 -1
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +3 -1
- data/app/controllers/katello/api/v2/content_views_controller.rb +4 -1
- data/app/controllers/katello/api/v2/environments_controller.rb +4 -0
- data/app/controllers/katello/api/v2/errata_controller.rb +12 -1
- data/app/controllers/katello/api/v2/flatpak_remote_repositories_controller.rb +81 -0
- data/app/controllers/katello/api/v2/flatpak_remotes_controller.rb +86 -0
- data/app/controllers/katello/api/v2/host_bootc_images_controller.rb +71 -0
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +4 -6
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +3 -5
- data/app/controllers/katello/api/v2/repositories_controller.rb +18 -3
- data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +0 -8
- data/app/controllers/katello/concerns/api/v2/http_proxies_controller_extensions.rb +17 -0
- data/app/controllers/katello/concerns/http_proxies_controller_extensions.rb +20 -0
- data/app/controllers/katello/sync_management_controller.rb +6 -2
- data/app/helpers/katello/content_source_helper.rb +8 -1
- data/app/helpers/katello/content_view_helper.rb +3 -1
- data/app/lib/actions/candlepin/activation_key/create.rb +1 -3
- data/app/lib/actions/candlepin/activation_key/update.rb +1 -3
- data/app/lib/actions/candlepin/environment/set_content.rb +17 -4
- data/app/lib/actions/katello/activation_key/create.rb +1 -2
- data/app/lib/actions/katello/activation_key/update.rb +2 -4
- data/app/lib/actions/katello/capsule_content/refresh_repos.rb +7 -1
- data/app/lib/actions/katello/content_view/presenters/incremental_updates_presenter.rb +3 -2
- data/app/lib/actions/katello/content_view/publish.rb +7 -2
- data/app/lib/actions/katello/content_view_environment/reassign_objects.rb +11 -2
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +31 -22
- data/app/lib/actions/katello/flatpak/mirror_remote_repository.rb +30 -0
- data/app/lib/actions/katello/flatpak/scan_remote.rb +17 -12
- data/app/lib/actions/katello/host/update_system_purpose.rb +1 -6
- data/app/lib/actions/pulp3/orchestration/repository/import_upload.rb +18 -2
- data/app/lib/actions/pulp3/repository/multi_copy_units.rb +4 -0
- data/app/lib/katello/api/v2/rendering.rb +2 -1
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +3 -4
- data/app/lib/katello/concerns/bookmark_controller_validator_extensions.rb +13 -0
- data/app/lib/katello/resources/candlepin/activation_key.rb +3 -5
- data/app/lib/katello/resources/candlepin/product.rb +2 -1
- data/app/lib/katello/util/cveak_migrator.rb +3 -2
- data/app/lib/katello/validators/alternate_content_source_path_validator.rb +2 -2
- data/app/lib/katello/validators/container_image_name_validator.rb +1 -1
- data/app/lib/katello/validators/content_validator.rb +1 -1
- data/app/lib/katello/validators/content_view_environment_coherent_default_validator.rb +2 -2
- data/app/lib/katello/validators/content_view_environment_org_validator.rb +2 -2
- data/app/lib/katello/validators/content_view_environment_validator.rb +3 -3
- data/app/lib/katello/validators/content_view_erratum_filter_rule_validator.rb +12 -12
- data/app/lib/katello/validators/content_view_filter_version_validator.rb +1 -1
- data/app/lib/katello/validators/generated_content_view_validator.rb +1 -1
- data/app/lib/katello/validators/gpg_key_content_type_validator.rb +2 -2
- data/app/lib/katello/validators/gpg_key_content_validator.rb +5 -5
- data/app/lib/katello/validators/katello_label_format_validator.rb +4 -4
- data/app/lib/katello/validators/katello_name_format_validator.rb +2 -2
- data/app/lib/katello/validators/katello_url_format_validator.rb +1 -1
- data/app/lib/katello/validators/library_presence_validator.rb +1 -1
- data/app/lib/katello/validators/no_trailing_space_validator.rb +1 -1
- data/app/lib/katello/validators/non_library_environment_validator.rb +1 -1
- data/app/lib/katello/validators/not_in_library_validator.rb +1 -1
- data/app/lib/katello/validators/path_descendents_validator.rb +1 -1
- data/app/lib/katello/validators/prior_validator.rb +1 -1
- data/app/lib/katello/validators/product_unique_attribute_validator.rb +1 -1
- data/app/lib/katello/validators/repo_disablement_validator.rb +2 -2
- data/app/lib/katello/validators/root_repository_unique_attribute_validator.rb +1 -1
- data/app/lib/katello/validators/self_reference_environment_validator.rb +1 -1
- data/app/lib/katello/validators/unique_field_in_org.rb +1 -1
- data/app/models/katello/activation_key.rb +6 -17
- data/app/models/katello/authorization/flatpak_remote.rb +33 -0
- data/app/models/katello/concerns/content_facet_host_extensions.rb +2 -1
- data/app/models/katello/concerns/host_managed_extensions.rb +8 -5
- data/app/models/katello/concerns/http_proxy_extensions.rb +4 -0
- data/app/models/katello/concerns/smart_proxy_extensions.rb +30 -6
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +0 -8
- data/app/models/katello/content_view.rb +4 -2
- data/app/models/katello/content_view_erratum_filter.rb +18 -2
- data/app/models/katello/content_view_version.rb +6 -0
- data/app/models/katello/docker_manifest.rb +8 -0
- data/app/models/katello/docker_manifest_list.rb +8 -0
- data/app/models/katello/erratum.rb +8 -2
- data/app/models/katello/flatpak_remote.rb +16 -0
- data/app/models/katello/flatpak_remote_repository.rb +18 -0
- data/app/models/katello/flatpak_remote_repository_manifest.rb +4 -0
- data/app/models/katello/glue/candlepin/pool.rb +1 -1
- data/app/models/katello/glue/pulp/repos.rb +12 -1
- data/app/models/katello/host/content_facet.rb +42 -3
- data/app/models/katello/host/subscription_facet.rb +4 -12
- data/app/models/katello/repository.rb +21 -8
- data/app/models/katello/rhel_lifecycle_status.rb +6 -0
- data/app/models/katello/root_repository.rb +6 -8
- data/app/models/katello/upstream_pool.rb +1 -0
- data/app/overrides/add_organization_attributes.rb +6 -0
- data/app/services/katello/product_content_finder.rb +2 -1
- data/app/services/katello/pulp3/content_view_version/importable_repositories.rb +1 -1
- data/app/services/katello/pulp3/docker_manifest.rb +3 -2
- data/app/services/katello/pulp3/docker_manifest_list.rb +3 -2
- data/app/services/katello/pulp3/repository/ansible_collection.rb +8 -1
- data/app/services/katello/pulp3/repository/apt.rb +16 -18
- data/app/services/katello/pulp3/repository/file.rb +4 -2
- data/app/services/katello/pulp3/repository.rb +4 -0
- data/app/services/katello/pulp3/task.rb +2 -2
- data/app/views/foreman/job_templates/bootc_action.erb +26 -0
- data/app/views/foreman/job_templates/bootc_rollback.erb +13 -0
- data/app/views/foreman/job_templates/bootc_status.erb +13 -0
- data/app/views/foreman/job_templates/bootc_switch.erb +13 -0
- data/app/views/foreman/job_templates/bootc_upgrade.erb +13 -0
- data/app/views/foreman/job_templates/flatpak_install.erb +23 -0
- data/app/views/foreman/job_templates/flatpak_login_action.erb +30 -0
- data/app/views/foreman/job_templates/flatpak_setup.erb +27 -0
- data/app/views/foreman/job_templates/install_errata_by_search_query.erb +1 -1
- data/app/views/foreman/job_templates/install_errata_by_search_query_-_katello_ansible_default.erb +1 -1
- data/app/views/foreman/job_templates/resolve_traces_-_katello_ansible_default.erb +1 -1
- data/app/views/foreman/job_templates/update_packages_by_search_query_-_katello_ansible_default.erb +1 -1
- data/app/views/katello/api/v2/activation_keys/base.json.rabl +0 -4
- data/app/views/katello/api/v2/content_facet/base.json.rabl +2 -1
- data/app/views/katello/api/v2/content_view_filter_rules/show.json.rabl +1 -0
- data/app/views/katello/api/v2/content_view_versions/base.json.rabl +5 -1
- data/app/views/katello/api/v2/docker_manifest_lists/show.json.rabl +1 -1
- data/app/views/katello/api/v2/docker_manifests/show.json.rabl +1 -1
- data/app/views/katello/api/v2/flatpak_remote_repositories/base.json.rabl +4 -0
- data/app/views/katello/api/v2/flatpak_remote_repositories/index.json.rabl +7 -0
- data/app/views/katello/api/v2/flatpak_remote_repositories/show.json.rabl +13 -0
- data/app/views/katello/api/v2/flatpak_remotes/base.json.rabl +5 -0
- data/app/views/katello/api/v2/flatpak_remotes/index.json.rabl +8 -0
- data/app/views/katello/api/v2/flatpak_remotes/permissions.json.rabl +11 -0
- data/app/views/katello/api/v2/flatpak_remotes/show.json.rabl +3 -0
- data/app/views/katello/api/v2/hosts/base.json.rabl +0 -8
- data/app/views/katello/api/v2/hosts/os_attributes.json.rabl +13 -0
- data/app/views/katello/api/v2/http_proxies/show.json.rabl +1 -0
- data/app/views/katello/api/v2/repositories/base.json.rabl +1 -0
- data/app/views/katello/api/v2/repositories/show.json.rabl +1 -0
- data/app/views/katello/api/v2/subscription_facet/base.json.rabl +0 -4
- data/app/views/katello/api/v2/subscriptions/show.json.rabl +1 -1
- data/app/views/overrides/activation_keys/_host_synced_content_select.html.erb +10 -4
- data/app/views/overrides/http_proxies/_update_setting_input.html.erb +18 -0
- data/app/views/overrides/organizations/_step_1_override.html.erb +5 -0
- data/config/initializers/monkeys.rb +0 -1
- data/config/initializers/pagelets.rb +6 -0
- data/config/routes/api/registry.rb +1 -0
- data/config/routes/api/v2.rb +21 -0
- data/config/routes/overrides.rb +1 -0
- data/config/routes.rb +2 -0
- data/db/migrate/20190605014649_add_purpose_addons.rb +0 -12
- data/db/migrate/20200213184848_create_evr_type.rb +126 -1
- data/db/migrate/20200818192230_update_system_purpose_status.rb +0 -1
- data/db/migrate/20240207191223_remove_entitlement_mode_host_statuses.rb +0 -1
- data/db/migrate/20240924161240_katello_recreate_evr_constructs.rb +160 -0
- data/db/migrate/20241022121706_add_sync_dependencies_option.rb +5 -0
- data/db/migrate/20241101144625_remove_system_purpose_addons.rb +9 -0
- data/db/migrate/20241107002541_add_registry_url_to_katello_flatpak_remotes.rb +5 -0
- data/db/migrate/20241112145802_add_manifest_entity_to_content_facets.rb +7 -0
- data/db/migrate/20241120213713_add_allow_other_types_to_content_view_erratum_filter_rules.rb +6 -0
- data/db/migrate/20241206183052_add_content_type_to_container_manifests_and_lists.rb +9 -0
- data/db/seeds.d/75-job_templates.rb +5 -1
- data/engines/bastion/vendor/assets/javascripts/bastion/angular/angular.js +2 -2
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-bootstrap/ui-bootstrap-tpls.js +3 -3
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-bootstrap/ui-bootstrap.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details-info.controller.js +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details.controller.js +1 -41
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-info.html +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/subscription-add-or-remove.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-system-purpose-modal.controller.js +1 -41
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-traces-modal.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-subscriptions-modal.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-system-purpose-modal.html +0 -13
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +1 -35
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -14
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-provisioning-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/debs.controller.js +46 -22
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/deb-content-views.controller.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/views/debs.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-content-views.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-details.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-errata.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata-tasks-list.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +85 -29
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn_IN.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ca.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/cs_CZ.po +341 -96
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +31 -54
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_AT.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_DE.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/el.po +341 -96
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_GB.po +349 -104
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_US.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +33 -56
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/et_EE.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +80 -68
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gl.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gu.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/he_IL.po +339 -111
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/hi.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/id.po +379 -130
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +342 -103
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +70 -83
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ka.po +84 -90
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/kn.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +130 -138
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ml_IN.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/mr.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/nl_NL.po +343 -97
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/or.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pa.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl_PL.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +40 -63
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro_RO.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +343 -102
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sl.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sv_SE.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta_IN.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/te.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/tr.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi_VN.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +70 -83
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +362 -105
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +29 -29
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/package-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/products-bulk-advanced-sync-modal.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-sync-plan-modal.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +24 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-tasks.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +21 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-info.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-tasks.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/views/discovery-create.html +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/views/discovery.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/partials/product-table-sync-status.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-start-date.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/views/sync-plans.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/tasks-table.directive.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/task-details.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/tasks-index.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/tasks-table.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/user-tasks-table.html +1 -1
- data/lib/katello/engine.rb +6 -0
- data/lib/katello/permission_creator.rb +37 -0
- data/lib/katello/permissions/host_permissions.rb +2 -0
- data/lib/katello/permissions/registry_permissions.rb +1 -0
- data/lib/katello/plugin.rb +18 -1
- data/lib/katello/repository_types/docker.rb +0 -1
- data/lib/katello/repository_types/python.rb +1 -1
- data/lib/katello/version.rb +1 -1
- data/lib/katello.rb +2 -0
- data/locale/Makefile +20 -24
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn/katello.po +248 -263
- data/locale/bn_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn_IN/katello.po +247 -262
- data/locale/ca/LC_MESSAGES/katello.mo +0 -0
- data/locale/ca/katello.po +247 -262
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/katello.po +524 -799
- data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs_CZ/katello.po +254 -269
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.po +248 -263
- data/locale/de_AT/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_AT/katello.po +247 -262
- data/locale/de_DE/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_DE/katello.po +250 -265
- data/locale/el/LC_MESSAGES/katello.mo +0 -0
- data/locale/el/katello.po +252 -267
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/katello.po +257 -271
- data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_GB/katello.po +264 -279
- data/locale/en_US/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_US/katello.po +247 -262
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.po +248 -263
- data/locale/et_EE/LC_MESSAGES/katello.mo +0 -0
- data/locale/et_EE/katello.po +247 -262
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.po +250 -265
- data/locale/gl/LC_MESSAGES/katello.mo +0 -0
- data/locale/gl/katello.po +247 -262
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/katello.po +250 -265
- data/locale/he_IL/LC_MESSAGES/katello.mo +0 -0
- data/locale/he_IL/katello.po +249 -264
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/katello.po +248 -263
- data/locale/id/LC_MESSAGES/katello.mo +0 -0
- data/locale/id/katello.po +264 -275
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po +254 -270
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.po +250 -265
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/katello.po +247 -262
- data/locale/katello.pot +1216 -1215
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/katello.po +248 -263
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.po +248 -263
- data/locale/ml_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ml_IN/katello.po +247 -262
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/katello.po +248 -263
- data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
- data/locale/nl_NL/katello.po +254 -268
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/katello.po +248 -263
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/katello.po +248 -263
- data/locale/pl/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl/katello.po +249 -264
- data/locale/pl_PL/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl_PL/katello.po +247 -262
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/katello.po +248 -263
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.po +248 -263
- data/locale/ro/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro/katello.po +247 -262
- data/locale/ro_RO/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro_RO/katello.po +247 -262
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po +255 -270
- data/locale/sl/LC_MESSAGES/katello.mo +0 -0
- data/locale/sl/katello.po +247 -262
- data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
- data/locale/sv_SE/katello.po +249 -264
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/katello.po +248 -263
- data/locale/ta_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta_IN/katello.po +247 -262
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/katello.po +248 -263
- data/locale/tr/LC_MESSAGES/katello.mo +0 -0
- data/locale/tr/katello.po +247 -262
- data/locale/vi/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi/katello.po +247 -262
- data/locale/vi_VN/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi_VN/katello.po +247 -262
- data/locale/zh/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh/katello.po +247 -262
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.po +250 -265
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.po +257 -272
- data/webpack/ForemanColumnExtensions/index.js +73 -3
- data/webpack/ForemanColumnExtensions/index.scss +9 -0
- data/webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js +1 -0
- data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.js +1 -1
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeCard.js +1 -20
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeEditModal.js +3 -61
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/__tests__/SystemPurposeCard.test.js +0 -5
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/__tests__/SystemPurposeEditModal.test.js +0 -5
- data/webpack/components/extensions/HostDetails/DetailsTabCards/ImageModeCard.js +87 -0
- data/webpack/components/extensions/HostDetails/DetailsTabCards/RegistrationCard.js +28 -2
- data/webpack/components/extensions/HostDetails/Tabs/DebsTab/DebInstallModal.js +1 -1
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +2 -2
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackageInstallModal.js +1 -1
- data/webpack/components/extensions/Hosts/FontAwesomeImageModeIcon.js +55 -0
- data/webpack/containers/Application/config.js +5 -0
- data/webpack/global_index.js +3 -1
- data/webpack/redux/actions/RedHatRepositories/helpers.js +9 -0
- data/webpack/scenes/BootedContainerImages/BootedContainerImagesConstants.js +5 -0
- data/webpack/scenes/BootedContainerImages/BootedContainerImagesPage.js +242 -0
- data/webpack/scenes/BootedContainerImages/__tests__/bootedContainerImages.fixtures.js +42 -0
- data/webpack/scenes/BootedContainerImages/__tests__/bootedContainerImagesPage.test.js +233 -0
- data/webpack/scenes/BootedContainerImages/index.js +4 -0
- data/webpack/scenes/ContentViews/Delete/__tests__/affectedHosts.fixtures.json +1 -2
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +39 -7
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +13 -2
- data/webpack/scenes/ContentViews/Details/Filters/CVFilterDetailType.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataDateFilterContent.test.js +1 -0
- data/webpack/scenes/ContentViews/Details/Repositories/RepoIcon.js +4 -2
- data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/hosts.fixtures.json +1 -2
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignActivationKeysForm.js +20 -1
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignHostsForm.js +20 -1
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVVersionRemoveReview.js +128 -18
- data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvAffectedActivationKeys.fixture.json +0 -1
- data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvAffectedHosts.fixture.json +1 -2
- data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvVersionRemove.test.js +6 -4
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedActivationKeys.js +5 -1
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedHosts.js +6 -1
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +1 -1
- data/webpack/scenes/ContentViews/expansions/DetailsExpansion.js +5 -1
- data/webpack/scenes/SmartProxy/ExpandableCvDetails.js +4 -2
- data/webpack/scenes/SmartProxy/__tests__/SmartProxyContentTest.js +38 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionPurposeAttributes.js +0 -1
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailInfo.test.js.snap +0 -10
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +0 -3
- data/webpack/scenes/Subscriptions/Details/__tests__/subscriptionDetails.fixtures.js +0 -1
- metadata +61 -58
- data/app/models/katello/activation_key_purpose_addon.rb +0 -6
- data/app/models/katello/purpose_addon.rb +0 -11
- data/app/models/katello/subscription_facet_purpose_addon.rb +0 -6
- data/lib/monkeys/fx_sqlite_skip.rb +0 -13
- data/locale/action_names.rb +0 -181
- data/locale/bn/katello.po.time_stamp +0 -0
- data/locale/bn_IN/katello.po.time_stamp +0 -0
- data/locale/ca/katello.po.time_stamp +0 -0
- data/locale/cs/katello.po.time_stamp +0 -0
- data/locale/cs_CZ/katello.po.time_stamp +0 -0
- data/locale/de/katello.po.time_stamp +0 -0
- data/locale/de_AT/katello.po.time_stamp +0 -0
- data/locale/de_DE/katello.po.time_stamp +0 -0
- data/locale/el/katello.po.time_stamp +0 -0
- data/locale/en/katello.po.time_stamp +0 -0
- data/locale/en_GB/katello.po.time_stamp +0 -0
- data/locale/en_US/katello.po.time_stamp +0 -0
- data/locale/es/katello.po.time_stamp +0 -0
- data/locale/et_EE/katello.po.time_stamp +0 -0
- data/locale/fr/katello.po.time_stamp +0 -0
- data/locale/gl/katello.po.time_stamp +0 -0
- data/locale/gu/katello.po.time_stamp +0 -0
- data/locale/he_IL/katello.po.time_stamp +0 -0
- data/locale/hi/katello.po.time_stamp +0 -0
- data/locale/id/katello.po.time_stamp +0 -0
- data/locale/it/katello.po.time_stamp +0 -0
- data/locale/ja/katello.po.time_stamp +0 -0
- data/locale/ka/katello.po.time_stamp +0 -0
- data/locale/kn/katello.po.time_stamp +0 -0
- data/locale/ko/katello.po.time_stamp +0 -0
- data/locale/ml_IN/katello.po.time_stamp +0 -0
- data/locale/mr/katello.po.time_stamp +0 -0
- data/locale/nl_NL/katello.po.time_stamp +0 -0
- data/locale/or/katello.po.time_stamp +0 -0
- data/locale/pa/katello.po.time_stamp +0 -0
- data/locale/pl/katello.po.time_stamp +0 -0
- data/locale/pl_PL/katello.po.time_stamp +0 -0
- data/locale/pt/katello.po.time_stamp +0 -0
- data/locale/pt_BR/katello.po.time_stamp +0 -0
- data/locale/ro/katello.po.time_stamp +0 -0
- data/locale/ro_RO/katello.po.time_stamp +0 -0
- data/locale/ru/katello.po.time_stamp +0 -0
- data/locale/sl/katello.po.time_stamp +0 -0
- data/locale/sv_SE/katello.po.time_stamp +0 -0
- data/locale/ta/katello.po.time_stamp +0 -0
- data/locale/ta_IN/katello.po.time_stamp +0 -0
- data/locale/te/katello.po.time_stamp +0 -0
- data/locale/tr/katello.po.time_stamp +0 -0
- data/locale/vi/katello.po.time_stamp +0 -0
- data/locale/vi_VN/katello.po.time_stamp +0 -0
- data/locale/zh/katello.po.time_stamp +0 -0
- data/locale/zh_CN/katello.po.time_stamp +0 -0
- data/locale/zh_TW/katello.po.time_stamp +0 -0
@@ -6,11 +6,11 @@ module Katello
|
|
6
6
|
case attribute
|
7
7
|
when :base_url
|
8
8
|
unless AlternateContentSourcePathValidator.validate_base_url(value)
|
9
|
-
record.errors
|
9
|
+
record.errors.add(attribute, N_("%s is not a valid path") % value)
|
10
10
|
end
|
11
11
|
when :subpaths
|
12
12
|
unless AlternateContentSourcePathValidator.validate_subpaths(value)
|
13
|
-
record.errors
|
13
|
+
record.errors.add(attribute, N_('All subpaths must have a slash at the end and none at the front'))
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -3,7 +3,7 @@ module Katello
|
|
3
3
|
class ContainerImageNameValidator < ActiveModel::EachValidator
|
4
4
|
def validate_each(record, attribute, value)
|
5
5
|
if value && !ContainerImageNameValidator.validate_name(value)
|
6
|
-
record.errors
|
6
|
+
record.errors.add(attribute, N_("invalid container image name"))
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
@@ -4,7 +4,7 @@ module Katello
|
|
4
4
|
def validate_each(record, attribute, value)
|
5
5
|
value.encode("UTF-8", 'binary') unless value.blank?
|
6
6
|
rescue Encoding::UndefinedConversionError
|
7
|
-
record.errors
|
7
|
+
record.errors.add(attribute, (options[:message] || _("cannot be a binary file.")))
|
8
8
|
end
|
9
9
|
end
|
10
10
|
end
|
@@ -11,8 +11,8 @@ module Katello
|
|
11
11
|
env = KTEnvironment.where(:id => environment_id).first
|
12
12
|
return if view.blank? || env.blank?
|
13
13
|
if view.default? && !env.library?
|
14
|
-
record.errors
|
15
|
-
{:view => view.name, :env => env.name}
|
14
|
+
record.errors.add(:base, _("Lifecycle environment '%{env}' cannot be used with content view '%{view}'") %
|
15
|
+
{:view => view.name, :env => env.name})
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
@@ -6,11 +6,11 @@ module Katello
|
|
6
6
|
view = ContentView.where(:id => record.content_view_id).first
|
7
7
|
environment = KTEnvironment.where(:id => environment_id).first
|
8
8
|
if view.blank? || environment.blank?
|
9
|
-
record.errors
|
9
|
+
record.errors.add(:base, _("Content view environments must have both a content view and an environment"))
|
10
10
|
end
|
11
11
|
|
12
12
|
unless view&.organization == environment&.organization
|
13
|
-
record.errors
|
13
|
+
record.errors.add(:base, _("%{view_label} could not be promoted to %{environment_label} because the content view and the environment are not in the same organization!") % {:view_label => view&.label, :environment_label => environment&.label})
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -10,12 +10,12 @@ module Katello
|
|
10
10
|
if environment_id
|
11
11
|
env = KTEnvironment.where(:id => environment_id).first
|
12
12
|
unless view.blank? || env.blank? || view.in_environment?(env)
|
13
|
-
record.errors
|
14
|
-
{:view => view.name, :env => env.name}
|
13
|
+
record.errors.add(:base, _("Content view '%{view}' is not in environment '%{env}'") %
|
14
|
+
{:view => view.name, :env => env.name})
|
15
15
|
end
|
16
16
|
end
|
17
17
|
if view&.generated_for_repository?
|
18
|
-
record.errors
|
18
|
+
record.errors.add(:base, _("Generated content views cannot be assigned to hosts or activation keys"))
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
@@ -2,10 +2,10 @@ module Katello
|
|
2
2
|
module Validators
|
3
3
|
class ContentViewErratumFilterRuleValidator < ActiveModel::Validator
|
4
4
|
def validate(record)
|
5
|
-
if record.errata_id.blank? && record.start_date.blank? && record.end_date.blank? && record.types.blank?
|
5
|
+
if record.errata_id.blank? && record.start_date.blank? && record.end_date.blank? && record.types.blank? && record.allow_other_types == false
|
6
6
|
invalid_parameters = _("Invalid erratum filter rule specified, Must specify at least one of the following:" \
|
7
|
-
|
8
|
-
record.errors
|
7
|
+
" 'errata_id', 'start_date', 'end_date', 'types', or 'allow_other_types'")
|
8
|
+
record.errors.add(:base, invalid_parameters)
|
9
9
|
return
|
10
10
|
end
|
11
11
|
|
@@ -14,7 +14,7 @@ module Katello
|
|
14
14
|
!record.types.blank?)
|
15
15
|
invalid_parameters = _("Invalid erratum filter rule specified, 'errata_id' cannot be specified in the" \
|
16
16
|
" same tuple as 'start_date', 'end_date' or 'types'")
|
17
|
-
record.errors
|
17
|
+
record.errors.add(:base, invalid_parameters)
|
18
18
|
return
|
19
19
|
end
|
20
20
|
|
@@ -28,13 +28,13 @@ module Katello
|
|
28
28
|
if !record.filter.erratum_rules.empty? &&
|
29
29
|
!record.filter.erratum_rules.any? { |rule| rule.id == record.id }
|
30
30
|
invalid_parameters = _("May not add a type or date range rule to a filter that has existing rules.")
|
31
|
-
record.errors
|
31
|
+
record.errors.add(:base, invalid_parameters)
|
32
32
|
end
|
33
33
|
|
34
34
|
else
|
35
35
|
if record.filter_has_date_or_type_rule?
|
36
36
|
invalid_parameters = _("May not add an id rule to a filter that has an existing type or date range rule.")
|
37
|
-
record.errors
|
37
|
+
record.errors.add(:base, invalid_parameters)
|
38
38
|
end
|
39
39
|
|
40
40
|
end
|
@@ -45,14 +45,14 @@ module Katello
|
|
45
45
|
end_date_int = record.end_date.to_time.to_i unless record.end_date.blank?
|
46
46
|
|
47
47
|
if start_date_int && (!start_date_int.is_a?(Integer) || !record.start_date.is_a?(String))
|
48
|
-
record.errors
|
48
|
+
record.errors.add(:base, _("The erratum filter rule start date is in an invalid format or type."))
|
49
49
|
end
|
50
50
|
if end_date_int && (!end_date_int.is_a?(Integer) || !record.end_date.is_a?(String))
|
51
|
-
record.errors
|
51
|
+
record.errors.add(:base, _("The erratum filter rule end date is in an invalid format or type."))
|
52
52
|
end
|
53
53
|
|
54
54
|
if start_date_int && end_date_int && !(start_date_int <= end_date_int)
|
55
|
-
record.errors
|
55
|
+
record.errors.add(:base, _("Invalid date range. The erratum filter rule start date must come before the end date"))
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
@@ -60,13 +60,13 @@ module Katello
|
|
60
60
|
if record.types.is_a?(Array)
|
61
61
|
invalid_types = record.types.collect(&:to_s) - ContentViewErratumFilter::ERRATA_TYPES.keys
|
62
62
|
unless invalid_types.empty?
|
63
|
-
record.errors
|
63
|
+
record.errors.add(:base,
|
64
64
|
_("Invalid erratum types %{invalid_types} provided. Erratum type can be any of %{valid_types}") %
|
65
65
|
{ :invalid_types => invalid_types.join(","),
|
66
|
-
:valid_types => ContentViewErratumFilter::ERRATA_TYPES.keys.join(",")}
|
66
|
+
:valid_types => ContentViewErratumFilter::ERRATA_TYPES.keys.join(",")})
|
67
67
|
end
|
68
68
|
else
|
69
|
-
record.errors
|
69
|
+
record.errors.add(:base, _("The erratum type must be an array. Invalid value provided"))
|
70
70
|
end
|
71
71
|
end
|
72
72
|
end
|
@@ -5,7 +5,7 @@ module Katello
|
|
5
5
|
if !record.version.blank? && (!record.min_version.blank? || !record.max_version.blank?)
|
6
6
|
invalid_parameters = _("Invalid filter rule specified, 'version' cannot be specified in the" \
|
7
7
|
" same tuple as 'min_version' or 'max_version'")
|
8
|
-
record.errors
|
8
|
+
record.errors.add(:base, invalid_parameters)
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
@@ -6,7 +6,7 @@ module Katello
|
|
6
6
|
if cve.content_view_id
|
7
7
|
view = ContentView.where(:id => cve.content_view_id).first
|
8
8
|
if view&.generated_for_repository?
|
9
|
-
record.errors
|
9
|
+
record.errors.add(:base, _("Content view '%{cv_name}' is a generated content view, which cannot be assigned to hosts or activation keys.") % { :cv_name => view.name })
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -6,13 +6,13 @@ module Katello
|
|
6
6
|
# ssl_ca_cert, ssl_client_cert, ssl_client_key of GpgKey.content type "cert"
|
7
7
|
|
8
8
|
if !record.gpg_key.blank? && record.gpg_key.content_type != "gpg_key"
|
9
|
-
record.errors
|
9
|
+
record.errors.add(:gpg_key, _("Wrong content type submitted."))
|
10
10
|
end
|
11
11
|
|
12
12
|
if record.instance_of?(Katello::Product)
|
13
13
|
[:ssl_ca_cert, :ssl_client_cert, :ssl_client_key].each do |cert|
|
14
14
|
if !record.send(cert).blank? && record.send(cert).content_type != "cert"
|
15
|
-
record.errors
|
15
|
+
record.errors.add(cert, _("Wrong content type submitted."))
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
@@ -15,25 +15,25 @@ module Katello
|
|
15
15
|
gpg_key_line_array.pop
|
16
16
|
|
17
17
|
if gpg_key_line_array.empty?
|
18
|
-
record.errors
|
18
|
+
record.errors.add(attribute, _("must contain valid Public GPG Key"))
|
19
19
|
else
|
20
20
|
unless gpg_key_line_array.drop(1).join.match(/[a-zA-Z0-9+\/=]*/)
|
21
|
-
record.errors
|
21
|
+
record.errors.add(attribute, _("must contain valid Public GPG Key"))
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
25
|
else
|
26
|
-
record.errors
|
26
|
+
record.errors.add(attribute, _("must contain valid Public GPG Key"))
|
27
27
|
end
|
28
28
|
|
29
29
|
else
|
30
|
-
record.errors
|
30
|
+
record.errors.add(attribute, _("must contain GPG Key"))
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
34
|
def self.validate_line_length(record, attribute, value)
|
35
35
|
value.each_line do |line|
|
36
|
-
record.errors
|
36
|
+
record.errors.add(attribute, _("must contain valid Public GPG Key")) if line.length > ContentCredential::MAX_CONTENT_LINE_LENGTH
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
@@ -3,18 +3,18 @@ module Katello
|
|
3
3
|
class KatelloLabelFormatValidator < ActiveModel::EachValidator
|
4
4
|
def validate_each(record, attribute, value)
|
5
5
|
if value
|
6
|
-
record.errors
|
6
|
+
record.errors.add(attribute, N_("cannot contain characters other than ascii alpha numerals, '_', '-'. ")) unless value =~ /\A[a-zA-Z0-9_\-]+\z/
|
7
7
|
NoTrailingSpaceValidator.validate_trailing_space(record, attribute, value)
|
8
8
|
KatelloLabelFormatValidator.validate_length(record, attribute, value)
|
9
9
|
else
|
10
|
-
record.errors
|
10
|
+
record.errors.add(attribute, N_("can't be blank"))
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
14
|
def self.validate_length(record, attribute, value, max_length = 128, min_length = 1)
|
15
15
|
if value
|
16
|
-
record.errors
|
17
|
-
record.errors
|
16
|
+
record.errors.add(attribute, N_("cannot contain more than %s characters") % max_length) unless value.length <= max_length
|
17
|
+
record.errors.add(attribute, N_("must contain at least %s character") % min_length) unless value.length >= min_length
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -8,13 +8,13 @@ module Katello
|
|
8
8
|
NoTrailingSpaceValidator.validate_trailing_space(record, attribute, value)
|
9
9
|
KatelloNameFormatValidator.validate_length(record, attribute, value)
|
10
10
|
else
|
11
|
-
record.errors
|
11
|
+
record.errors.add(attribute, N_("cannot be blank"))
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
15
|
def self.validate_length(record, attribute, value, min_length = 1)
|
16
16
|
if value && !(value.length >= min_length)
|
17
|
-
record.errors
|
17
|
+
record.errors.add(attribute, _("must contain at least %s character") % min_length)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -2,7 +2,7 @@ module Katello
|
|
2
2
|
module Validators
|
3
3
|
class LibraryPresenceValidator < ActiveModel::EachValidator
|
4
4
|
def validate_each(record, attribute, value)
|
5
|
-
record.errors
|
5
|
+
record.errors.add(attribute, N_("must contain '%s'") % "Library") if value.select { |e| e.library }.empty?
|
6
6
|
end
|
7
7
|
end
|
8
8
|
end
|
@@ -7,7 +7,7 @@ module Katello
|
|
7
7
|
|
8
8
|
def self.validate_trailing_space(record, attribute, value)
|
9
9
|
if value && !(value.strip == value)
|
10
|
-
record.errors
|
10
|
+
record.errors.add(attribute, _("must not contain leading or trailing white spaces."))
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -3,7 +3,7 @@ module Katello
|
|
3
3
|
class NonLibraryEnvironmentValidator < ActiveModel::EachValidator
|
4
4
|
def validate_each(record, attribute, value)
|
5
5
|
return unless value
|
6
|
-
record.errors
|
6
|
+
record.errors.add(attribute, N_("Cannot register a system to the '%s' environment") % "Library") if !record.environment.nil? && record.environment.library?
|
7
7
|
end
|
8
8
|
end
|
9
9
|
end
|
@@ -2,7 +2,7 @@ module Katello
|
|
2
2
|
module Validators
|
3
3
|
class NotInLibraryValidator < ActiveModel::Validator
|
4
4
|
def validate(record)
|
5
|
-
record.errors
|
5
|
+
record.errors.add(:environment, _("The '%s' environment cannot contain a changeset!") % "Library") if record.environment.library?
|
6
6
|
end
|
7
7
|
end
|
8
8
|
end
|
@@ -6,7 +6,7 @@ module Katello
|
|
6
6
|
#environment is not duplicated in its path
|
7
7
|
# We do not want circular dependencies
|
8
8
|
return if record.prior.nil?
|
9
|
-
record.errors
|
9
|
+
record.errors.add(:prior, _(" environment cannot be set to an environment already on its path")) if duplicate? record.prior
|
10
10
|
end
|
11
11
|
|
12
12
|
def duplicate?(record)
|
@@ -8,7 +8,7 @@ module Katello
|
|
8
8
|
# prior to have only one child (unless its the Library)
|
9
9
|
ancestor = record.prior
|
10
10
|
if ancestor && !ancestor.library? && (ancestor.successors.count == 1 && !ancestor.successors.include?(record))
|
11
|
-
record.errors
|
11
|
+
record.errors.add(:prior, _("prior environment can only have one child"))
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -5,7 +5,7 @@ module Katello
|
|
5
5
|
unique = self.unique_attribute?(record, attribute, value)
|
6
6
|
|
7
7
|
unless unique
|
8
|
-
record.errors
|
8
|
+
record.errors.add(attribute, _("has already been taken for a product in this organization."))
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
@@ -3,9 +3,9 @@ module Katello
|
|
3
3
|
class RepoDisablementValidator < ActiveModel::Validator
|
4
4
|
def validate(record)
|
5
5
|
if record.redhat? && record.enabled_changed? && !record.enabled? && record.promoted?
|
6
|
-
record.errors
|
6
|
+
record.errors.add(:base, N_("Repository cannot be disabled since it has already been promoted."))
|
7
7
|
elsif !record.redhat? && !record.enabled?
|
8
|
-
record.errors
|
8
|
+
record.errors.add(:base, N_("Custom repositories cannot be disabled."))
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
@@ -5,7 +5,7 @@ module Katello
|
|
5
5
|
exists = RootRepository.where(:product_id => record.product_id, attribute => value).where("id != ?", record.id || -1).exists?
|
6
6
|
|
7
7
|
if record.send("#{attribute}_changed?") && record.custom? && exists
|
8
|
-
record.errors
|
8
|
+
record.errors.add(attribute, _("has already been taken for this product."))
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
@@ -2,7 +2,7 @@ module Katello
|
|
2
2
|
module Validators
|
3
3
|
class SelfReferenceEnvironmentValidator < ActiveModel::Validator
|
4
4
|
def validate(record)
|
5
|
-
record.errors
|
5
|
+
record.errors.add(:base, _("Environment cannot be in its own promotion path")) if record.priors.select(:id).include? record.id
|
6
6
|
end
|
7
7
|
end
|
8
8
|
end
|
@@ -7,7 +7,7 @@ module Katello
|
|
7
7
|
if value
|
8
8
|
others = record.class.where(attribute => value).joins(:environment).where("#{Katello::KTEnvironment.table_name}.organization_id" => record.environment.organization_id)
|
9
9
|
others = others.where("#{record.class.table_name}.id != ?", record.id) if record.persisted?
|
10
|
-
record.errors
|
10
|
+
record.errors.add(attribute, N_("already taken")) if others.any?
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -27,11 +27,7 @@ module Katello
|
|
27
27
|
has_many :subscription_facet_activation_keys, :class_name => "Katello::SubscriptionFacetActivationKey", :dependent => :destroy
|
28
28
|
has_many :subscription_facets, :through => :subscription_facet_activation_keys
|
29
29
|
|
30
|
-
has_many :activation_key_purpose_addons, :class_name => "Katello::ActivationKeyPurposeAddon", :dependent => :destroy, :inverse_of => :activation_key
|
31
|
-
has_many :purpose_addons, :class_name => "Katello::PurposeAddon", :through => :activation_key_purpose_addons
|
32
|
-
|
33
30
|
before_destroy :validate_destroyable!
|
34
|
-
accepts_nested_attributes_for :purpose_addons
|
35
31
|
|
36
32
|
validates_lengths_from_database
|
37
33
|
validates_with Validators::KatelloNameFormatValidator, :attributes => :name
|
@@ -42,16 +38,16 @@ module Katello
|
|
42
38
|
validates_each :max_hosts do |record, attr, value|
|
43
39
|
if record.unlimited_hosts
|
44
40
|
unless value.nil?
|
45
|
-
record.errors
|
41
|
+
record.errors.add(attr, _("cannot be set because unlimited hosts is set"))
|
46
42
|
end
|
47
43
|
else
|
48
44
|
if value.nil?
|
49
|
-
record.errors
|
45
|
+
record.errors.add(attr, _("cannot be nil"))
|
50
46
|
elsif value <= 0
|
51
|
-
record.errors
|
47
|
+
record.errors.add(attr, _("cannot be less than one"))
|
52
48
|
elsif value < record.subscription_facets.length
|
53
49
|
# we don't let users to set usage limit lower than current in-use
|
54
|
-
record.errors
|
50
|
+
record.errors.add(attr, _("cannot be lower than current usage count (%s)" % record.subscription_facets.length))
|
55
51
|
end
|
56
52
|
end
|
57
53
|
end
|
@@ -88,7 +84,6 @@ module Katello
|
|
88
84
|
:only_explicit => true, :validator => ScopedSearch::Validators::INTEGER, :ext_method => :find_by_subscription_id
|
89
85
|
scoped_search :on => :purpose_usage, :rename => :usage, :complete_value => true
|
90
86
|
scoped_search :on => :purpose_role, :rename => :role, :complete_value => true
|
91
|
-
scoped_search :on => :name, :rename => :addon, :relation => :purpose_addon, :complete_value => true, :ext_method => :find_by_purpose_addons
|
92
87
|
|
93
88
|
def self.in_environments(envs)
|
94
89
|
with_environments(envs)
|
@@ -97,7 +92,7 @@ module Katello
|
|
97
92
|
def content_view_environments=(new_cves)
|
98
93
|
if new_cves.length > 1 && !Setting['allow_multiple_content_views']
|
99
94
|
fail ::Katello::Errors::MultiEnvironmentNotSupportedError,
|
100
|
-
_("Assigning an activation key to multiple content view environments is not enabled.")
|
95
|
+
_("Assigning an activation key to multiple content view environments is not enabled. To enable, set the allow_multiple_content_views setting.")
|
101
96
|
end
|
102
97
|
super(new_cves)
|
103
98
|
Katello::ContentViewEnvironmentActivationKey.reprioritize_for_activation_key(self, new_cves)
|
@@ -270,12 +265,6 @@ module Katello
|
|
270
265
|
end
|
271
266
|
end
|
272
267
|
|
273
|
-
def self.find_by_purpose_addons(_key, operator, value)
|
274
|
-
conditions = sanitize_sql_for_conditions(["#{Katello::PurposeAddon.table_name}.name #{operator} ?", value_to_sql(operator, value)])
|
275
|
-
activation_keys = ::Katello::ActivationKey.joins(:purpose_addons).where(conditions)
|
276
|
-
return_activation_keys_by_id(activation_keys.pluck(:id))
|
277
|
-
end
|
278
|
-
|
279
268
|
def validate_destroyable!
|
280
269
|
if !organization.being_deleted? && Parameter.where(name: 'kt_activation_keys').pluck(:value).any? { |value| value.split(",").include?(name) }
|
281
270
|
fail _("This activation key is associated to one or more Hosts/Hostgroups. "\
|
@@ -301,7 +290,7 @@ module Katello
|
|
301
290
|
property :name, String, desc: 'Returns the name of the Activation Key.'
|
302
291
|
end
|
303
292
|
class Jail < ::Safemode::Jail
|
304
|
-
allow :name
|
293
|
+
allow :name, :content_view_environment_labels, :multi_content_view_environment?
|
305
294
|
end
|
306
295
|
end
|
307
296
|
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Katello
|
2
|
+
module Authorization::FlatpakRemote
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
include Authorizable
|
6
|
+
|
7
|
+
def readable?
|
8
|
+
authorized?(:view_flatpak_remotes)
|
9
|
+
end
|
10
|
+
|
11
|
+
def editable?
|
12
|
+
authorized?(:edit_flatpak_remotes)
|
13
|
+
end
|
14
|
+
|
15
|
+
def deletable?
|
16
|
+
authorized?(:destroy_flatpak_remotes)
|
17
|
+
end
|
18
|
+
|
19
|
+
module ClassMethods
|
20
|
+
def readable
|
21
|
+
authorized(:view_flatpak_remotes)
|
22
|
+
end
|
23
|
+
|
24
|
+
def editable
|
25
|
+
authorized(:edit_flatpak_remotes)
|
26
|
+
end
|
27
|
+
|
28
|
+
def deletable
|
29
|
+
authorized(:destroy_flatpak_remotes)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -94,7 +94,8 @@ module Katello
|
|
94
94
|
if state
|
95
95
|
hosts = ::Host::Managed.joins(:content_facet).select(:id).where.not("#{::Katello::Host::ContentFacet.table_name}.bootc_booted_image" => nil)
|
96
96
|
else
|
97
|
-
hosts
|
97
|
+
# left_outer_joins will include hosts without a content facet. We assume such hosts are package-mode hosts.
|
98
|
+
hosts = ::Host::Managed.left_outer_joins(:content_facet).select(:id).where("#{::Katello::Host::ContentFacet.table_name}.bootc_booted_image" => nil)
|
98
99
|
end
|
99
100
|
{ :conditions => "#{::Host::Managed.table_name}.id IN (#{hosts.to_sql})" }
|
100
101
|
end
|
@@ -89,7 +89,7 @@ module Katello
|
|
89
89
|
prepend Overrides
|
90
90
|
|
91
91
|
delegate :content_source_id, :single_content_view, :single_lifecycle_environment, :default_environment?, :single_content_view_environment?, :multi_content_view_environment?, :kickstart_repository_id, :bound_repositories,
|
92
|
-
:installable_errata, :installable_rpms, :image_mode_host?, to: :content_facet, allow_nil: true
|
92
|
+
:content_view_environment_labels, :installable_errata, :installable_rpms, :image_mode_host?, to: :content_facet, allow_nil: true
|
93
93
|
|
94
94
|
delegate :release_version, :purpose_role, :purpose_usage, to: :subscription_facet, allow_nil: true
|
95
95
|
|
@@ -98,6 +98,9 @@ module Katello
|
|
98
98
|
has_many :content_views, through: :content_view_environments
|
99
99
|
has_many :lifecycle_environments, through: :content_view_environments
|
100
100
|
|
101
|
+
has_one :docker_manifest, through: :content_facet, source: :manifest_entity, source_type: 'Katello::DockerManifest'
|
102
|
+
has_one :docker_manifest_list, through: :content_facet, source: :manifest_entity, source_type: 'Katello::DockerManifestList'
|
103
|
+
|
101
104
|
has_many :host_installed_packages, :class_name => "::Katello::HostInstalledPackage", :foreign_key => :host_id, :dependent => :delete_all
|
102
105
|
has_many :installed_packages, :class_name => "::Katello::InstalledPackage", :through => :host_installed_packages
|
103
106
|
|
@@ -586,8 +589,8 @@ module Katello
|
|
586
589
|
end
|
587
590
|
end
|
588
591
|
|
589
|
-
def advisory_ids(search
|
590
|
-
errata_scope =
|
592
|
+
def advisory_ids(search:)
|
593
|
+
errata_scope = ::Katello::Erratum.installable_for_hosts([self])
|
591
594
|
ids = errata_scope.search_for(search).pluck(:errata_id)
|
592
595
|
if ids.empty?
|
593
596
|
fail _("Cannot install errata: No errata found for search term '%s'") % search
|
@@ -620,8 +623,8 @@ class ::Host::Managed::Jail < Safemode::Jail
|
|
620
623
|
:host_collections, :pools, :hypervisor_host, :installed_debs,
|
621
624
|
:installed_packages, :traces_helpers, :advisory_ids, :package_names_for_job_template,
|
622
625
|
:filtered_entitlement_quantity_consumed, :bound_repositories,
|
623
|
-
:single_content_view, :single_lifecycle_environment, :
|
624
|
-
:purpose_role, :purpose_usage
|
626
|
+
:single_content_view, :single_lifecycle_environment, :content_view_environment_labels, :multi_content_view_environment?,
|
627
|
+
:release_version, :purpose_role, :purpose_usage
|
625
628
|
end
|
626
629
|
|
627
630
|
class ActiveRecord::Associations::CollectionProxy::Jail < Safemode::Jail
|