katello 3.16.1.2 → 3.18.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.

Files changed (623) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/katello/katello.scss +3 -7
  3. data/app/controllers/katello/api/registry/registry_proxies_controller.rb +42 -23
  4. data/app/controllers/katello/api/rhsm/candlepin_dynflow_proxy_controller.rb +1 -1
  5. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +4 -2
  6. data/app/controllers/katello/api/v2/activation_keys_controller.rb +17 -14
  7. data/app/controllers/katello/api/v2/api_controller.rb +1 -1
  8. data/app/controllers/katello/api/v2/content_credentials_controller.rb +2 -9
  9. data/app/controllers/katello/api/v2/content_uploads_controller.rb +5 -5
  10. data/app/controllers/katello/api/v2/content_view_components_controller.rb +31 -14
  11. data/app/controllers/katello/api/v2/content_view_repositories_controller.rb +48 -0
  12. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +92 -24
  13. data/app/controllers/katello/api/v2/content_views_controller.rb +27 -25
  14. data/app/controllers/katello/api/v2/environments_controller.rb +8 -8
  15. data/app/controllers/katello/api/v2/gpg_keys_controller.rb +6 -6
  16. data/app/controllers/katello/api/v2/host_collections_controller.rb +19 -16
  17. data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +10 -4
  18. data/app/controllers/katello/api/v2/host_tracer_controller.rb +16 -36
  19. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +39 -1
  20. data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +1 -1
  21. data/app/controllers/katello/api/v2/repositories_controller.rb +23 -16
  22. data/app/controllers/katello/api/v2/subscriptions_controller.rb +2 -2
  23. data/app/controllers/katello/api/v2/sync_plans_controller.rb +8 -9
  24. data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +23 -0
  25. data/app/controllers/katello/concerns/api/v2/{associations_permission_check.rb → authorization.rb} +24 -2
  26. data/app/controllers/katello/concerns/api/v2/bulk_hosts_extensions.rb +4 -4
  27. data/app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb +1 -1
  28. data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +21 -0
  29. data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +1 -1
  30. data/app/controllers/katello/concerns/organizations_controller_extensions.rb +24 -0
  31. data/app/helpers/katello/concerns/dashboard_helper_extensions.rb +10 -0
  32. data/app/helpers/katello/content_view_helper.rb +1 -1
  33. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +6 -7
  34. data/app/helpers/katello/katello_urls_helper.rb +5 -2
  35. data/app/lib/actions/candlepin/product/content_create.rb +2 -0
  36. data/app/lib/actions/candlepin/product/content_update.rb +2 -0
  37. data/app/lib/actions/katello/capsule_content/sync.rb +1 -1
  38. data/app/lib/actions/katello/content_view/capsule_sync.rb +1 -1
  39. data/app/lib/actions/katello/content_view/destroy.rb +2 -2
  40. data/app/lib/actions/katello/content_view/incremental_updates.rb +1 -1
  41. data/app/lib/actions/katello/content_view/promote.rb +2 -2
  42. data/app/lib/actions/katello/content_view/promote_to_environment.rb +13 -3
  43. data/app/lib/actions/katello/content_view/publish.rb +29 -9
  44. data/app/lib/actions/katello/content_view_puppet_environment/clone.rb +1 -1
  45. data/app/lib/actions/katello/content_view_puppet_environment/create.rb +2 -2
  46. data/app/lib/actions/katello/content_view_version/import.rb +37 -0
  47. data/app/lib/actions/katello/content_view_version/incremental_update.rb +23 -8
  48. data/app/lib/actions/katello/host/hypervisors_update.rb +18 -0
  49. data/app/lib/actions/katello/host/update_system_purpose.rb +31 -0
  50. data/app/lib/actions/katello/organization/create.rb +1 -1
  51. data/app/lib/actions/katello/organization/simple_content_access/disable.rb +25 -0
  52. data/app/lib/actions/katello/organization/simple_content_access/enable.rb +25 -0
  53. data/app/lib/actions/katello/organization/simple_content_access/toggle.rb +50 -0
  54. data/app/lib/actions/katello/orphan_cleanup/remove_orphans.rb +13 -0
  55. data/app/lib/actions/katello/product/content_create.rb +7 -6
  56. data/app/lib/actions/katello/repository/clone_contents.rb +3 -3
  57. data/app/lib/actions/katello/repository/clone_to_environment.rb +2 -2
  58. data/app/lib/actions/katello/repository/clone_to_version.rb +1 -1
  59. data/app/lib/actions/katello/repository/create.rb +1 -1
  60. data/app/lib/actions/katello/repository/destroy.rb +5 -3
  61. data/app/lib/actions/katello/repository/export.rb +3 -3
  62. data/app/lib/actions/katello/repository/filtered_index_content.rb +10 -1
  63. data/app/lib/actions/katello/repository/finish_upload.rb +2 -2
  64. data/app/lib/actions/katello/repository/import_upload.rb +5 -4
  65. data/app/lib/actions/katello/repository/metadata_generate.rb +1 -1
  66. data/app/lib/actions/katello/repository/multi_clone_contents.rb +9 -7
  67. data/app/lib/actions/katello/repository/purge_empty_content.rb +1 -1
  68. data/app/lib/actions/katello/repository/remove_content.rb +1 -1
  69. data/app/lib/actions/katello/repository/sync.rb +2 -2
  70. data/app/lib/actions/katello/repository/update.rb +6 -3
  71. data/app/lib/actions/katello/repository/update_http_proxy_details.rb +1 -1
  72. data/app/lib/actions/katello/repository/update_metadata_sync.rb +1 -1
  73. data/app/lib/actions/katello/repository/upload_files.rb +2 -2
  74. data/app/lib/actions/katello/repository/verify_checksum.rb +2 -2
  75. data/app/lib/actions/pulp/content_view_puppet_environment/copy_contents.rb +1 -1
  76. data/app/lib/actions/pulp/orchestration/orphan_cleanup/remove_orphans.rb +1 -1
  77. data/app/lib/actions/pulp/orchestration/repository/smart_proxy_sync.rb +1 -0
  78. data/app/lib/actions/pulp/repository/copy_all_units.rb +1 -1
  79. data/app/lib/actions/pulp/repository/copy_units.rb +1 -1
  80. data/app/lib/actions/pulp/repository/create.rb +1 -1
  81. data/app/lib/actions/pulp/repository/destroy.rb +1 -1
  82. data/app/lib/actions/pulp/repository/remove_units.rb +2 -2
  83. data/app/lib/actions/pulp/repository/sync.rb +1 -1
  84. data/app/lib/actions/pulp3/content_guard/refresh_all_distributions.rb +19 -0
  85. data/app/lib/actions/pulp3/content_migration.rb +3 -3
  86. data/app/lib/actions/pulp3/content_view_version/create_exporter.rb +20 -0
  87. data/app/lib/actions/pulp3/content_view_version/create_importer.rb +24 -0
  88. data/app/lib/actions/pulp3/content_view_version/destroy_exporter.rb +16 -0
  89. data/app/lib/actions/pulp3/content_view_version/destroy_importer.rb +16 -0
  90. data/app/lib/actions/pulp3/content_view_version/export.rb +20 -0
  91. data/app/lib/actions/pulp3/content_view_version/import.rb +25 -0
  92. data/app/lib/actions/pulp3/import_migration.rb +3 -3
  93. data/app/lib/actions/pulp3/orchestration/content_view_version/copy_version_units_to_library.rb +25 -0
  94. data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +82 -0
  95. data/app/lib/actions/pulp3/orchestration/content_view_version/import.rb +47 -0
  96. data/app/lib/actions/pulp3/orchestration/repository/create.rb +1 -1
  97. data/app/lib/actions/pulp3/orchestration/repository/upload_content.rb +1 -1
  98. data/app/lib/actions/pulp3/repository/commit_upload.rb +2 -1
  99. data/app/lib/actions/pulp3/repository/copy_content.rb +6 -1
  100. data/app/lib/actions/pulp3/repository/multi_copy_units.rb +2 -2
  101. data/app/lib/actions/pulp3/repository/refresh_distribution.rb +11 -5
  102. data/app/lib/actions/pulp3/repository/save_artifact.rb +2 -2
  103. data/app/lib/actions/pulp3/repository/save_distribution_references.rb +2 -2
  104. data/app/lib/actions/pulp3/repository/save_version.rb +1 -1
  105. data/app/lib/actions/pulp3/repository/save_versions.rb +1 -1
  106. data/app/lib/actions/pulp3/repository/upload_file.rb +1 -1
  107. data/app/lib/katello/concerns/base_template_scope_extensions.rb +5 -3
  108. data/app/lib/katello/concerns/permission_extensions.rb +14 -0
  109. data/app/lib/katello/foreman.rb +1 -1
  110. data/app/lib/katello/resources/candlepin/consumer.rb +2 -2
  111. data/app/lib/katello/resources/candlepin/owner.rb +5 -0
  112. data/app/lib/katello/resources/candlepin/upstream_consumer.rb +6 -0
  113. data/app/lib/katello/resources/registry.rb +6 -6
  114. data/app/lib/katello/validators/hostgroup_kickstart_repository_validator.rb +11 -11
  115. data/app/models/katello/activation_key.rb +1 -1
  116. data/app/models/katello/authorization/activation_key.rb +4 -0
  117. data/app/models/katello/authorization/content_view.rb +13 -0
  118. data/app/models/katello/authorization/content_view_component.rb +15 -0
  119. data/app/models/katello/authorization/content_view_version_export_history.rb +11 -0
  120. data/app/models/katello/authorization/gpg_key.rb +12 -4
  121. data/app/models/katello/authorization/lifecycle_environment.rb +8 -0
  122. data/app/models/katello/authorization/product.rb +4 -0
  123. data/app/models/katello/authorization/repository.rb +8 -0
  124. data/app/models/katello/authorization/sync_plan.rb +16 -0
  125. data/app/models/katello/concerns/content_facet_host_extensions.rb +9 -1
  126. data/app/models/katello/concerns/host_managed_extensions.rb +39 -0
  127. data/app/models/katello/concerns/hostgroup_extensions.rb +46 -24
  128. data/app/models/katello/concerns/organization_extensions.rb +5 -1
  129. data/app/models/katello/concerns/pulp_database_unit.rb +2 -2
  130. data/app/models/katello/concerns/redhat_extensions.rb +4 -2
  131. data/app/models/katello/concerns/smart_proxy_extensions.rb +21 -18
  132. data/app/models/katello/concerns/subscription_facet_host_extensions.rb +1 -1
  133. data/app/models/katello/concerns/widget_extensions.rb +23 -0
  134. data/app/models/katello/content_view.rb +16 -2
  135. data/app/models/katello/content_view_component.rb +2 -0
  136. data/app/models/katello/content_view_puppet_environment.rb +1 -1
  137. data/app/models/katello/content_view_version.rb +20 -2
  138. data/app/models/katello/content_view_version_export_history.rb +24 -0
  139. data/app/models/katello/docker_meta_tag.rb +1 -1
  140. data/app/models/katello/errata_status.rb +21 -12
  141. data/app/models/katello/erratum.rb +14 -1
  142. data/app/models/katello/erratum_cve.rb +8 -0
  143. data/app/models/katello/glue/candlepin/owner.rb +4 -2
  144. data/app/models/katello/glue/candlepin/pool.rb +9 -14
  145. data/app/models/katello/glue/pulp/repo.rb +12 -2
  146. data/app/models/katello/gpg_key.rb +1 -1
  147. data/app/models/katello/host/content_facet.rb +25 -0
  148. data/app/models/katello/host_collection.rb +6 -0
  149. data/app/models/katello/hostgroup/content_facet.rb +18 -0
  150. data/app/models/katello/installed_package.rb +8 -0
  151. data/app/models/katello/kt_environment.rb +10 -2
  152. data/app/models/katello/model.rb +16 -0
  153. data/app/models/katello/package_group.rb +1 -1
  154. data/app/models/katello/ping.rb +8 -3
  155. data/app/models/katello/pool.rb +17 -0
  156. data/app/models/katello/product.rb +6 -0
  157. data/app/models/katello/pulp3/content_guard.rb +1 -1
  158. data/app/models/katello/purpose_addons_status.rb +1 -0
  159. data/app/models/katello/purpose_role_status.rb +1 -0
  160. data/app/models/katello/purpose_sla_status.rb +1 -0
  161. data/app/models/katello/purpose_status.rb +2 -2
  162. data/app/models/katello/purpose_usage_status.rb +1 -0
  163. data/app/models/katello/repository.rb +21 -16
  164. data/app/models/katello/rhsm_fact_parser.rb +1 -1
  165. data/app/models/katello/root_repository.rb +42 -14
  166. data/app/models/katello/subscription_status.rb +1 -1
  167. data/app/models/katello/sync_plan.rb +8 -0
  168. data/app/models/katello/trace_status.rb +1 -1
  169. data/app/models/setting/content.rb +7 -1
  170. data/app/overrides/add_organization_attributes.rb +12 -0
  171. data/app/services/katello/candlepin/event_handler.rb +3 -0
  172. data/app/services/katello/candlepin/message_handler.rb +34 -0
  173. data/app/services/katello/candlepin/upstream_consumer.rb +28 -0
  174. data/app/services/katello/event_daemon.rb +7 -8
  175. data/app/services/katello/host_status_manager.rb +29 -0
  176. data/app/services/katello/host_trace_manager.rb +38 -0
  177. data/app/services/katello/pulp/content.rb +1 -1
  178. data/app/services/katello/pulp/repository.rb +7 -7
  179. data/app/services/katello/pulp/repository/deb.rb +2 -2
  180. data/app/services/katello/pulp/repository/docker.rb +5 -5
  181. data/app/services/katello/pulp/repository/file.rb +2 -2
  182. data/app/services/katello/pulp/repository/ostree.rb +2 -2
  183. data/app/services/katello/pulp/repository/puppet.rb +2 -2
  184. data/app/services/katello/pulp/repository/yum.rb +5 -6
  185. data/app/services/katello/pulp/smart_proxy_repository.rb +1 -1
  186. data/app/services/katello/pulp3/ansible_collection.rb +2 -2
  187. data/app/services/katello/pulp3/api/apt.rb +57 -0
  188. data/app/services/katello/pulp3/api/core.rb +24 -0
  189. data/app/services/katello/pulp3/content.rb +3 -3
  190. data/app/services/katello/pulp3/content_view_version/export.rb +68 -0
  191. data/app/services/katello/pulp3/content_view_version/import.rb +77 -0
  192. data/app/services/katello/pulp3/content_view_version/import_export_common.rb +44 -0
  193. data/app/services/katello/pulp3/deb.rb +38 -0
  194. data/app/services/katello/pulp3/distribution.rb +2 -2
  195. data/app/services/katello/pulp3/docker_blob.rb +2 -2
  196. data/app/services/katello/pulp3/docker_manifest.rb +2 -2
  197. data/app/services/katello/pulp3/docker_manifest_list.rb +2 -2
  198. data/app/services/katello/pulp3/docker_tag.rb +2 -2
  199. data/app/services/katello/pulp3/erratum.rb +2 -2
  200. data/app/services/katello/pulp3/file_unit.rb +2 -2
  201. data/app/services/katello/pulp3/migration.rb +139 -34
  202. data/app/services/katello/pulp3/migration_plan.rb +50 -14
  203. data/app/services/katello/pulp3/migration_switchover.rb +41 -9
  204. data/app/services/katello/pulp3/module_stream.rb +2 -2
  205. data/app/services/katello/pulp3/package_group.rb +2 -2
  206. data/app/services/katello/pulp3/pulp_content_unit.rb +5 -0
  207. data/app/services/katello/pulp3/repository.rb +9 -2
  208. data/app/services/katello/pulp3/repository/ansible_collection.rb +9 -0
  209. data/app/services/katello/pulp3/repository/apt.rb +63 -0
  210. data/app/services/katello/pulp3/repository/docker.rb +22 -10
  211. data/app/services/katello/pulp3/repository/yum.rb +24 -11
  212. data/app/services/katello/pulp3/repository_mirror.rb +11 -5
  213. data/app/services/katello/pulp3/rpm.rb +2 -2
  214. data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +1 -1
  215. data/app/services/katello/pulp3/smart_proxy_repository.rb +1 -1
  216. data/app/services/katello/pulp3/srpm.rb +2 -2
  217. data/app/services/katello/pulp3/task.rb +1 -1
  218. data/app/services/katello/pulp3/task_group.rb +1 -1
  219. data/app/services/katello/pulp3/yum_metadata_file.rb +2 -2
  220. data/app/services/katello/registration_manager.rb +9 -3
  221. data/app/services/katello/repository_type.rb +1 -1
  222. data/app/services/katello/smart_proxy_helper.rb +1 -1
  223. data/app/services/katello/ui_notifications/subscriptions/sca_disable_error.rb +13 -0
  224. data/app/services/katello/ui_notifications/subscriptions/sca_disable_success.rb +13 -0
  225. data/app/services/katello/ui_notifications/subscriptions/sca_enable_error.rb +13 -0
  226. data/app/services/katello/ui_notifications/subscriptions/sca_enable_success.rb +13 -0
  227. data/app/views/dashboard/_subscription_widget.html.erb +0 -5
  228. data/app/views/foreman/job_templates/install_errata_-_katello_ansible_default.erb +10 -2
  229. data/app/views/foreman/smart_proxies/_content_sync.html.erb +1 -1
  230. data/app/views/katello/api/v2/content_view_repositories/show_all.json.rabl +8 -0
  231. data/app/views/katello/api/v2/content_view_version_export_histories/index.json.rabl +7 -0
  232. data/app/views/katello/api/v2/content_view_version_export_histories/show.json.rabl +13 -0
  233. data/app/views/katello/api/v2/package_groups/show.json.rabl +1 -1
  234. data/app/views/katello/api/v2/packages/show.json.rabl +1 -1
  235. data/app/views/katello/api/v2/repositories/base.json.rabl +2 -1
  236. data/app/views/katello/api/v2/srpms/show.json.rabl +1 -1
  237. data/app/views/katello/api/v2/sync_plans/show.json.rabl +2 -1
  238. data/app/views/overrides/organizations/_edit_override.html.erb +10 -1
  239. data/app/views/overrides/organizations/_index_header_override.html.erb +3 -0
  240. data/app/views/overrides/organizations/_index_row_override.html.erb +3 -0
  241. data/config/routes/api/v2.rb +11 -7
  242. data/config/routes/overrides.rb +5 -0
  243. data/db/migrate/20141222151001_add_host_content_view_environment.rb +1 -1
  244. data/db/migrate/20180904122343_create_hostgroup_content_facet.katello.rb +16 -0
  245. data/db/migrate/20200514092553_move_katello_fields_from_hostgroups.katello.rb +53 -0
  246. data/db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb +9 -0
  247. data/db/migrate/20200701150946_add_auto_enabled_to_root_repository.rb +5 -0
  248. data/db/migrate/20200818040551_add_content_view_version_export_history.rb +13 -0
  249. data/db/migrate/20200818192230_update_system_purpose_status.rb +12 -0
  250. data/db/migrate/20200820145217_add_download_concurrency_to_katello_root_repositories.rb +5 -0
  251. data/db/migrate/20200910140340_remove_distribution_uuid.rb +5 -0
  252. data/db/migrate/20200914200906_remove_auto_enabled.rb +5 -0
  253. data/db/migrate/20201008204114_add_os_versions_to_katello_root_repositories.rb +5 -0
  254. data/db/migrate/20201012172713_remove_gpg_key_perms.rb +23 -0
  255. data/db/migrate/20201012192035_add_metadata_to_katello_content_view_version_export_history.rb +5 -0
  256. data/db/seeds.d/109-katello-notification-blueprints.rb +24 -0
  257. data/db/seeds.d/111-upgrade_tasks.rb +2 -1
  258. data/db/seeds.d/75-job_templates.rb +2 -2
  259. data/engines/bastion/app/assets/javascripts/bastion/bastion.js +1 -0
  260. data/engines/bastion/app/assets/javascripts/bastion/components/notification.service.js +1 -1
  261. data/engines/bastion/app/assets/javascripts/bastion/components/nutupane.factory.js +11 -14
  262. data/engines/bastion/app/assets/javascripts/bastion/routing.module.js +1 -1
  263. data/engines/bastion/vendor/assets/javascripts/bastion/angular-ui-router/stateEvents.js +300 -0
  264. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activation-keys.controller.js +1 -1
  265. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-add-subscriptions.controller.js +1 -1
  266. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-associations.controller.js +1 -1
  267. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details.controller.js +4 -2
  268. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-repository-sets.controller.js +4 -3
  269. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-subscriptions.controller.js +3 -5
  270. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-add-subscriptions.html +1 -1
  271. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-associations-content-hosts.html +2 -2
  272. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-details.html +1 -1
  273. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-repository-sets.html +1 -1
  274. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-products.controller.js +1 -1
  275. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-repositories.controller.js +1 -1
  276. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +5 -2
  277. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-host-collections-modal.controller.js +1 -1
  278. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-module-streams-modal.controller.js +1 -1
  279. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +4 -1
  280. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-repository-sets-modal.controller.js +1 -1
  281. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-subscriptions-modal.controller.js +2 -1
  282. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-system-purpose-modal.controller.js +112 -0
  283. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-traces-modal.controller.js +4 -5
  284. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-environment-modal.html +7 -1
  285. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +1 -0
  286. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +1 -0
  287. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-system-purpose-modal.html +78 -0
  288. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-modal-helper.service.js +11 -0
  289. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js +1 -1
  290. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +10 -3
  291. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.routes.js +1 -1
  292. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs-installed.controller.js +3 -43
  293. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +1 -1
  294. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-module-streams.controller.js +1 -1
  295. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js +1 -1
  296. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-installed.controller.js +1 -1
  297. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-traces.controller.js +1 -1
  298. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-host-collections.controller.js +1 -1
  299. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-subscriptions.controller.js +1 -1
  300. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +7 -1
  301. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +4 -2
  302. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-host-collections.controller.js +1 -1
  303. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-repository-sets.controller.js +4 -3
  304. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-subscriptions.controller.js +3 -5
  305. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-add-subscriptions.html +1 -1
  306. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +1 -0
  307. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +16 -8
  308. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-repository-sets.html +1 -1
  309. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions-list.html +1 -1
  310. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +10 -6
  311. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.controller.js +1 -1
  312. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/content-view-composite-available-content-views.controller.js +1 -1
  313. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/content-view-composite-content-views-list.controller.js +1 -1
  314. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-docker-repositories.controller.js +1 -1
  315. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-ostree-repositories.controller.js +1 -1
  316. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-docker-repositories-list.controller.js +1 -1
  317. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-ostree-repositories-list.controller.js +1 -1
  318. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-versions.controller.js +1 -1
  319. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/available-errata-filter.controller.js +1 -1
  320. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/available-package-group-filter.controller.js +1 -1
  321. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-names.controller.js +1 -1
  322. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-versions.controller.js +1 -1
  323. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-modules.controller.js +1 -1
  324. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +1 -1
  325. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/debs.controller.js +1 -1
  326. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/deb-content-views.controller.js +1 -1
  327. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/deb-repositories.controller.js +1 -1
  328. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/environment-content.controller.js +1 -1
  329. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum-repositories.controller.js +1 -1
  330. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/details/file-content-views.controller.js +1 -1
  331. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/details/file-repositories.controller.js +1 -1
  332. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/files.controller.js +1 -1
  333. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-details.controller.js +9 -2
  334. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-info.html +7 -1
  335. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/host-collections.controller.js +1 -1
  336. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-bulk-action.factory.js +3 -1
  337. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +51 -8
  338. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +58 -13
  339. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +46 -9
  340. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +43 -6
  341. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +37 -1
  342. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +37 -1
  343. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +37 -1
  344. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +46 -9
  345. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +37 -1
  346. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +37 -1
  347. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +37 -1
  348. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +4 -4
  349. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +11 -2
  350. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/organization-selector.controller.js +5 -14
  351. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/ostree-branch-repositories.controller.js +1 -1
  352. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/package-repositories.controller.js +1 -1
  353. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/packages.controller.js +1 -1
  354. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/products-bulk-advanced-sync-modal.controller.js +6 -7
  355. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/products-bulk-sync-plan-modal.controller.js +1 -1
  356. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-repositories.controller.js +1 -1
  357. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +168 -155
  358. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-manage-content.controller.js +1 -1
  359. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +19 -3
  360. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +125 -113
  361. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +20 -7
  362. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js +46 -0
  363. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +1 -1
  364. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module-content-views.controller.js +1 -1
  365. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module-repositories.controller.js +1 -1
  366. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.controller.js +1 -1
  367. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +2 -2
  368. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details-info.controller.js +4 -3
  369. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-details.html +1 -1
  370. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-info.html +1 -1
  371. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plans.controller.js +1 -1
  372. data/lib/katello/engine.rb +9 -5
  373. data/lib/katello/permission_creator.rb +81 -67
  374. data/lib/katello/permissions/host_permissions.rb +2 -0
  375. data/lib/katello/plugin.rb +24 -17
  376. data/lib/katello/repository_types/deb.rb +9 -1
  377. data/lib/katello/tasks/clean_published_repo_directories.rake +3 -3
  378. data/lib/katello/tasks/pulp3_content_switchover.rake +24 -6
  379. data/lib/katello/tasks/pulp3_migration.rake +4 -2
  380. data/lib/katello/tasks/pulp3_migration_stats.rake +21 -0
  381. data/lib/katello/tasks/pulp3_post_migration_check.rake +2 -2
  382. data/lib/katello/tasks/reimport.rake +2 -2
  383. data/lib/katello/tasks/reports.rake +0 -12
  384. data/lib/katello/tasks/repository.rake +15 -2
  385. data/lib/katello/tasks/reset.rake +2 -1
  386. data/lib/katello/tasks/test.rake +15 -0
  387. data/lib/katello/tasks/unify_hosts.rake +1 -0
  388. data/lib/katello/tasks/upgrades/3.11/update_puppet_repos.rake +3 -3
  389. data/lib/katello/tasks/upgrades/3.12/remove_pulp2_notifier.rake +2 -2
  390. data/lib/katello/tasks/upgrades/3.18/add_cvv_export_history_metadata.rb +18 -0
  391. data/lib/katello/tasks/upgrades/3.8/clear_checksum_type.rake +2 -2
  392. data/lib/katello/version.rb +1 -1
  393. data/locale/action_names.rb +47 -40
  394. data/locale/bn/katello.po +293 -31
  395. data/locale/cs/katello.po +292 -29
  396. data/locale/de/katello.po +294 -32
  397. data/locale/en/katello.po +292 -28
  398. data/locale/es/katello.po +294 -31
  399. data/locale/fr/katello.po +294 -31
  400. data/locale/gu/katello.po +293 -31
  401. data/locale/hi/katello.po +293 -31
  402. data/locale/it/katello.po +294 -31
  403. data/locale/ja/katello.po +294 -32
  404. data/locale/katello.pot +1431 -997
  405. data/locale/kn/katello.po +293 -31
  406. data/locale/ko/katello.po +294 -31
  407. data/locale/mr/katello.po +293 -31
  408. data/locale/or/katello.po +293 -31
  409. data/locale/pa/katello.po +293 -31
  410. data/locale/pt/katello.po +292 -28
  411. data/locale/pt_BR/katello.po +294 -31
  412. data/locale/ru/katello.po +294 -31
  413. data/locale/ta/katello.po +293 -31
  414. data/locale/te/katello.po +293 -31
  415. data/locale/zh_CN/katello.po +294 -31
  416. data/locale/zh_TW/katello.po +294 -32
  417. data/package.json +8 -25
  418. data/webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js +3 -0
  419. data/webpack/components/ActionableDetail.js +64 -0
  420. data/webpack/components/Content/ContentTable.js +2 -2
  421. data/webpack/components/Content/Details/ContentDetailRepositoryTableSchema.js +1 -1
  422. data/webpack/components/Content/Details/ContentDetails.js +1 -1
  423. data/webpack/components/Content/__tests__/ContentTable.test.js +2 -2
  424. data/webpack/components/Content/__tests__/__snapshots__/ContentPage.test.js.snap +1 -1
  425. data/webpack/components/EditableSwitch.js +30 -0
  426. data/webpack/components/EditableTextInput/EditableTextInput.js +120 -0
  427. data/webpack/components/EditableTextInput/__tests__/editableTextInput.test.js +52 -0
  428. data/webpack/components/EditableTextInput/editableTextInput.scss +14 -0
  429. data/webpack/components/EditableTextInput/index.js +3 -0
  430. data/webpack/{scenes/ContentViews/components → components}/Loading.js +8 -5
  431. data/webpack/{move_to_pf → components}/LoadingState/LoadingState.js +0 -0
  432. data/webpack/{move_to_pf → components}/LoadingState/LoadingState.scss +0 -0
  433. data/webpack/{move_to_pf → components}/LoadingState/LoadingState.test.js +0 -0
  434. data/webpack/{move_to_pf → components}/LoadingState/__snapshots__/LoadingState.test.js.snap +0 -0
  435. data/webpack/{move_to_pf → components}/LoadingState/index.js +0 -0
  436. data/webpack/components/MultiSelect/index.js +1 -1
  437. data/webpack/{move_to_pf → components}/OptionTooltip/OptionTooltip.scss +0 -0
  438. data/webpack/{move_to_pf → components}/OptionTooltip/__tests__/OptionTooltip.test.js +0 -0
  439. data/webpack/{move_to_pf → components}/OptionTooltip/__tests__/__snapshots__/OptionTooltip.test.js.snap +0 -0
  440. data/webpack/{move_to_pf → components}/OptionTooltip/index.js +0 -0
  441. data/webpack/components/Search/Search.js +124 -0
  442. data/webpack/components/Search/Search.test.js +2 -1
  443. data/webpack/components/Search/__snapshots__/Search.test.js.snap +2 -0
  444. data/webpack/components/Search/__tests__/search.test.js +124 -0
  445. data/webpack/components/Search/index.js +11 -87
  446. data/webpack/{move_to_pf → components}/Select/Select.js +0 -0
  447. data/webpack/components/SelectOrg/SetOrganization.js +2 -2
  448. data/webpack/components/TabWrapper/TabWrapper.js +26 -0
  449. data/webpack/components/TabWrapper/index.js +3 -0
  450. data/webpack/components/TabbedView/TabbedView.js +38 -0
  451. data/webpack/components/TabbedView/TabbedView.scss +3 -0
  452. data/webpack/components/TabbedView/index.js +3 -0
  453. data/webpack/components/Table/EmptyStateMessage.js +61 -0
  454. data/webpack/components/Table/MainTable.js +70 -0
  455. data/webpack/components/Table/TableWrapper.js +131 -0
  456. data/webpack/{move_to_pf → components}/TooltipButton/TooltipButton.js +0 -0
  457. data/webpack/{move_to_pf → components}/TooltipButton/TooltipButton.scss +0 -0
  458. data/webpack/{move_to_pf → components}/TooltipButton/TooltipButton.test.js +0 -0
  459. data/webpack/{move_to_pf → components}/TooltipButton/__snapshots__/TooltipButton.test.js.snap +0 -0
  460. data/webpack/{move_to_pf → components}/TooltipButton/index.js +0 -0
  461. data/webpack/components/TypeAhead/TypeAhead.js +109 -0
  462. data/webpack/{move_to_pf → components}/TypeAhead/TypeAhead.scss +0 -0
  463. data/webpack/components/TypeAhead/helpers/commonPropTypes.js +35 -0
  464. data/webpack/components/TypeAhead/helpers/helpers.js +32 -0
  465. data/webpack/components/TypeAhead/index.js +3 -0
  466. data/webpack/{move_to_pf/TypeAhead → components/TypeAhead/pf3Search}/TypeAheadInput.js +3 -6
  467. data/webpack/{move_to_pf/TypeAhead → components/TypeAhead/pf3Search}/TypeAheadItems.js +3 -7
  468. data/webpack/components/TypeAhead/pf3Search/TypeAheadSearch.js +52 -0
  469. data/webpack/components/TypeAhead/pf4Search/TypeAheadInput.js +44 -0
  470. data/webpack/components/TypeAhead/pf4Search/TypeAheadInput.scss +11 -0
  471. data/webpack/components/TypeAhead/pf4Search/TypeAheadItems.js +57 -0
  472. data/webpack/components/TypeAhead/pf4Search/TypeAheadSearch.js +66 -0
  473. data/webpack/components/TypeAhead/pf4Search/TypeAheadSearch.scss +5 -0
  474. data/webpack/components/extensions/about/__tests__/SystemStatuses.test.js +1 -1
  475. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/CollapseSubscriptionGroupButton.js +0 -0
  476. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/CollapseSubscriptionGroupButton.test.js +0 -0
  477. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/Table.js +0 -0
  478. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/Table.test.js +0 -0
  479. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableBody.js +0 -0
  480. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableBody.test.js +0 -0
  481. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableBodyMessage.js +0 -0
  482. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableBodyMessage.test.js +0 -0
  483. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableFixtures.js +0 -0
  484. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableSelectionCell.js +0 -0
  485. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableSelectionCell.test.js +0 -0
  486. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableSelectionHeaderCell.js +0 -0
  487. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/TableSelectionHeaderCell.test.js +0 -0
  488. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/__snapshots__/CollapseSubscriptionGroupButton.test.js.snap +0 -0
  489. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/__snapshots__/Table.test.js.snap +0 -0
  490. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/__snapshots__/TableBody.test.js.snap +0 -0
  491. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/__snapshots__/TableBodyMessage.test.js.snap +0 -0
  492. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/__snapshots__/TableSelectionCell.test.js.snap +0 -0
  493. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/__snapshots__/TableSelectionHeaderCell.test.js.snap +0 -0
  494. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/components/index.js +0 -0
  495. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/EntitlementsInlineEditFormatter.js +1 -1
  496. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/__tests__/EntitlementsInlineEditFormatter.test.js +0 -0
  497. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/__tests__/__snapshots__/EntitlementsInlineEditFormatter.test.js.snap +0 -0
  498. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/cellFormatter.js +0 -0
  499. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/collapseableAndSelectionCellFormatter.js +0 -0
  500. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/ellipsisCellFormatter.js +0 -0
  501. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/headerFormatter.js +0 -0
  502. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/index.js +0 -0
  503. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/selectionCellFormatter.js +0 -0
  504. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/formatters/selectionHeaderCellFormatter.js +0 -0
  505. data/webpack/{move_to_foreman/components/common/table → components/pf3Table}/index.js +0 -0
  506. data/webpack/{move_to_pf → components}/react-bootstrap-select/index.js +0 -0
  507. data/webpack/containers/Application/config.js +9 -4
  508. data/webpack/containers/Application/overrides.scss +5 -0
  509. data/webpack/global_test_setup.js +3 -1
  510. data/webpack/index.js +0 -1
  511. data/webpack/redux/OrganizationProducts/OrganizationProductsActions.js +1 -1
  512. data/webpack/redux/OrganizationProducts/__tests__/OrganizationProductsActions.test.js +2 -2
  513. data/webpack/redux/actions/RedHatRepositories/enabled.js +1 -1
  514. data/webpack/redux/actions/RedHatRepositories/repositorySetRepositories.js +1 -1
  515. data/webpack/redux/reducers/index.js +2 -0
  516. data/webpack/scenes/AnsibleCollections/AnsibleCollectionsActions.js +1 -1
  517. data/webpack/scenes/AnsibleCollections/AnsibleCollectionsTableSchema.js +1 -1
  518. data/webpack/scenes/AnsibleCollections/Details/AnsibleCollectionDetailsActions.js +1 -1
  519. data/webpack/scenes/AnsibleCollections/Details/__tests__/AnsibleCollectionDetailsActions.test.js +2 -2
  520. data/webpack/scenes/AnsibleCollections/__tests__/AnsibleCollectionsTable.test.js +1 -1
  521. data/webpack/scenes/ContentViews/ContentViewSelectors.js +6 -3
  522. data/webpack/scenes/ContentViews/ContentViewsActions.js +4 -4
  523. data/webpack/scenes/ContentViews/ContentViewsConstants.js +12 -1
  524. data/webpack/scenes/ContentViews/ContentViewsPage.js +14 -15
  525. data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +66 -0
  526. data/webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js +23 -0
  527. data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +28 -0
  528. data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +71 -0
  529. data/webpack/scenes/ContentViews/Details/ContentViewInfo.js +116 -0
  530. data/webpack/scenes/ContentViews/{details → Details}/DetailsContainer.js +8 -4
  531. data/webpack/scenes/ContentViews/Details/Repositories/ContentCounts.js +56 -0
  532. data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +169 -0
  533. data/webpack/scenes/ContentViews/Details/Repositories/LastSync.js +47 -0
  534. data/webpack/scenes/ContentViews/Details/Repositories/RepoAddedStatus.js +17 -0
  535. data/webpack/scenes/ContentViews/Details/Repositories/RepoIcon.js +23 -0
  536. data/webpack/scenes/ContentViews/Details/Repositories/SelectableDropdown.js +49 -0
  537. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.fixtures.json +154 -0
  538. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.test.js +131 -0
  539. data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetail.test.js +104 -0
  540. data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetails.fixtures.json +106 -0
  541. data/webpack/scenes/ContentViews/Details/contentViewInfo.scss +8 -0
  542. data/webpack/scenes/ContentViews/Details/index.js +7 -0
  543. data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +55 -37
  544. data/webpack/scenes/ContentViews/Table/tableDataGenerator.js +47 -44
  545. data/webpack/scenes/ContentViews/__tests__/basicContentViews.fixtures.js +31 -0
  546. data/webpack/scenes/ContentViews/__tests__/contentViewList.fixtures.json +2 -1
  547. data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +173 -23
  548. data/webpack/scenes/ContentViews/components/ContentViewIcon.js +26 -0
  549. data/webpack/scenes/ContentViews/components/{contentViewName.scss → contentViewIcon.scss} +0 -0
  550. data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsActions.js +1 -1
  551. data/webpack/scenes/ModuleStreams/Details/Profiles/TableSchema.js +1 -1
  552. data/webpack/scenes/ModuleStreams/Details/__tests__/ModuleStreamDetailsActions.test.js +2 -2
  553. data/webpack/scenes/ModuleStreams/ModuleStreamsActions.js +1 -1
  554. data/webpack/scenes/ModuleStreams/ModuleStreamsTableSchema.js +1 -1
  555. data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js +1 -1
  556. data/webpack/scenes/Organizations/OrganizationSelectors.js +14 -0
  557. data/webpack/scenes/Products/ProductActions.js +1 -1
  558. data/webpack/scenes/RedHatRepositories/RedHatRepositoriesPage.js +1 -1
  559. data/webpack/scenes/Settings/SettingsConstants.js +3 -0
  560. data/webpack/scenes/Settings/SettingsReducer.js +33 -0
  561. data/webpack/scenes/Settings/SettingsSelectors.js +4 -0
  562. data/webpack/scenes/Settings/index.js +2 -1
  563. data/webpack/scenes/Subscriptions/Details/SubscriptionDetailActions.js +1 -1
  564. data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.js +1 -1
  565. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +75 -91
  566. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.scss +15 -0
  567. data/webpack/scenes/Subscriptions/Manifest/ManifestActions.js +60 -1
  568. data/webpack/scenes/Subscriptions/Manifest/ManifestConstants.js +12 -0
  569. data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryTableSchema.js +1 -1
  570. data/webpack/scenes/Subscriptions/Manifest/SimpleContentAccess.js +95 -0
  571. data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +2 -0
  572. data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestActions.test.js +56 -1
  573. data/webpack/scenes/Subscriptions/Manifest/__tests__/SimpleContentAccess.test.js +108 -0
  574. data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +6 -6
  575. data/webpack/scenes/Subscriptions/Manifest/__tests__/manifest.fixtures.js +36 -0
  576. data/webpack/scenes/Subscriptions/Manifest/index.js +5 -5
  577. data/webpack/scenes/Subscriptions/SubscriptionActions.js +1 -1
  578. data/webpack/scenes/Subscriptions/SubscriptionConstants.js +4 -0
  579. data/webpack/scenes/Subscriptions/SubscriptionHelpers.js +0 -3
  580. data/webpack/scenes/Subscriptions/SubscriptionReducer.js +51 -12
  581. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +36 -19
  582. data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +5 -2
  583. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsActions.js +1 -1
  584. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +2 -2
  585. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsTableSchema.js +1 -1
  586. data/webpack/scenes/Subscriptions/__tests__/SubscriptionHelpers.test.js +0 -11
  587. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +3 -0
  588. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +24 -0
  589. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsSelectors.test.js +6 -0
  590. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsActions.test.js.snap +2 -2
  591. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +4 -4
  592. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsReducer.test.js.snap +114 -1
  593. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsSelectors.test.js.snap +6 -0
  594. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js +2 -2
  595. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +27 -21
  596. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +6 -2
  597. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +2 -2
  598. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionTypeFormatter.test.js.snap +3 -3
  599. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Table.js +1 -1
  600. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +15 -2
  601. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/__snapshots__/SubscriptionsToolbar.test.js.snap +5 -10
  602. data/webpack/scenes/Subscriptions/index.js +6 -2
  603. data/webpack/test-utils/nockWrapper.js +39 -5
  604. data/webpack/test-utils/react-testing-lib-wrapper.js +35 -9
  605. data/webpack/{move_to_foreman/common → utils}/helpers.js +12 -8
  606. data/webpack/utils/useEventListener.js +37 -0
  607. metadata +264 -107
  608. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-traces-resolve.factory.js +0 -18
  609. data/vendor/assets/stylesheets/katello/jquery.loadmask.css.scss +0 -40
  610. data/vendor/assets/stylesheets/katello/ui.spinner.css.scss +0 -3
  611. data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalActions.js +0 -2
  612. data/webpack/__mocks__/foremanReact/components/ForemanModal/ForemanModalSelectors.js +0 -2
  613. data/webpack/__mocks__/foremanReact/components/ForemanModal/index.js +0 -4
  614. data/webpack/__mocks__/foremanReact/components/Settings/SettingsActions.js +0 -4
  615. data/webpack/__mocks__/foremanReact/components/Settings/SettingsConstants.js +0 -2
  616. data/webpack/move_to_pf/TypeAhead/TypeAhead.js +0 -138
  617. data/webpack/move_to_pf/TypeAhead/helpers.js +0 -5
  618. data/webpack/scenes/ContentViews/Table/TableWrapper.js +0 -55
  619. data/webpack/scenes/ContentViews/components/ContentViewName.js +0 -33
  620. data/webpack/scenes/ContentViews/components/EmptyStateMessage.js +0 -43
  621. data/webpack/scenes/ContentViews/details/ContentViewDetailActions.js +0 -12
  622. data/webpack/scenes/ContentViews/details/ContentViewDetailSelectors.js +0 -15
  623. data/webpack/scenes/ContentViews/expansions/RepositoriesExpansion.js +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 808bc23ecac2fda98ac24ce30217831caa4977d250e759baf83ab78150db70f3
4
- data.tar.gz: 5531f14549ff16ea0f157a013ebf5ead92ab2acd5fa9a085face6f48fd0a3a50
3
+ metadata.gz: 7163fd6dce0ae11188b016225be2effa59131c5bcc4a4b3482a749dfba7ef545
4
+ data.tar.gz: 202f81621e52adce6d318faa95fa9a527c0e3fc0f25bab3c3cb2ca7133cb12e3
5
5
  SHA512:
6
- metadata.gz: 40a2c815ff331564ff218ce5d688183b4595d4c423e16f27cdb1d1cfb083bbaaa678d9d09cd5303cc6d56825bd300d33b2192dd5c51edf260a09b37aa7e5102f
7
- data.tar.gz: 785618e922bfa8a6f1a9675c4eccf2dc1d0e3038401ed9ac30ca1ddeb2294fbc2ba13987f07b08b96884aa90fcd1fd2a85acf18f28d2c9030a42782544941d0b
6
+ metadata.gz: 29f15645418ab0683328f83b804dc3fdf45d7f93ce4d23578a558310e0f1ad3cb7f2d98fe74ba3d16181505df56f081092aacb2bb028364995ac15413674862a
7
+ data.tar.gz: 99b0a150d0d689951d63b2acb37a0bbab702bfb5a13739572e764f9b49eeda60bb3451b6cc6a7aae4c20886755b499637213afef91eb565a92e2c887a4dcc376
@@ -1,10 +1,3 @@
1
- /**
2
- * = require "katello/jquery.loadmask.css"
3
- * = require "katello/jquery-ui-1.8.11.custom.css"
4
- * = require "katello/jquery.treeTable.css"
5
- * = require "katello/ui.spinner.css"
6
- */
7
-
8
1
  @import "katello/overrides";
9
2
  @import "katello/katello_base";
10
3
  @import "katello/look";
@@ -18,6 +11,9 @@
18
11
  @import "katello/generic";
19
12
  @import "katello/notifications";
20
13
 
14
+ @import "katello/jquery.treeTable";
15
+ @import "katello/jquery-ui-1.8.11.custom.css";
16
+
21
17
  body {
22
18
  background-color: white;
23
19
  }
@@ -10,8 +10,8 @@ module Katello
10
10
  before_action :registry_authorize, except: [:token, :v1_search, :catalog]
11
11
  before_action :authorize_repository_read, only: [:pull_manifest, :tags_list]
12
12
  before_action :authorize_repository_write, only: [:push_manifest]
13
- skip_before_action :check_content_type, only: [:start_upload_blob, :upload_blob, :finish_upload_blob,
14
- :chunk_upload_blob, :push_manifest]
13
+ skip_before_action :check_media_type, only: [:start_upload_blob, :upload_blob, :finish_upload_blob,
14
+ :chunk_upload_blob, :push_manifest]
15
15
 
16
16
  wrap_parameters false
17
17
 
@@ -166,25 +166,27 @@ module Katello
166
166
  headers[header[0].split('_')[1..-1].join('-')] = header[1]
167
167
  end
168
168
 
169
- r = Resources::Registry::Proxy.get(@_request.fullpath, headers)
170
- logger.debug filter_sensitive_data(r)
171
- results = JSON.parse(r)
172
-
173
- response.header['Docker-Content-Digest'] = "sha256:#{Digest::SHA256.hexdigest(r)}"
174
- # https://docs.docker.com/registry/spec/manifest-v2-2/
175
- # If its v2 schema 2 only the mediaType attribute will be present in the manifest
176
- media_type = results['mediaType']
177
- if media_type.blank?
178
- # so mediaType is not schema2 v2 only set the mediaType based on
179
- # https://docs.docker.com/registry/spec/manifest-v2-1/
180
- media_type = if results["signatures"].blank?
181
- 'application/vnd.docker.distribution.manifest.v1+json'
182
- else
183
- 'application/vnd.docker.distribution.manifest.v1+prettyjws'
184
- end
185
- end
169
+ if (manifest_response = redirect_client { Resources::Registry::Proxy.get(@_request.fullpath, headers) })
170
+ #when pulp 2 is removed, this should no longer be needed, and all clients should be redirected
171
+ logger.debug filter_sensitive_data(manifest_response)
172
+ results = JSON.parse(manifest_response)
173
+
174
+ response.header['Docker-Content-Digest'] = "sha256:#{Digest::SHA256.hexdigest(manifest_response)}"
175
+ # https://docs.docker.com/registry/spec/manifest-v2-2/
176
+ # If its v2 schema 2 only the mediaType attribute will be present in the manifest
177
+ media_type = results['mediaType']
178
+ if media_type.blank?
179
+ # so mediaType is not schema2 v2 only set the mediaType based on
180
+ # https://docs.docker.com/registry/spec/manifest-v2-1/
181
+ media_type = if results["signatures"].blank?
182
+ 'application/vnd.docker.distribution.manifest.v1+json'
183
+ else
184
+ 'application/vnd.docker.distribution.manifest.v1+prettyjws'
185
+ end
186
+ end
186
187
 
187
- render json: r, content_type: media_type
188
+ render json: manifest_response, content_type: media_type
189
+ end
188
190
  end
189
191
 
190
192
  def check_blob
@@ -199,9 +201,24 @@ module Katello
199
201
  render json: {}
200
202
  end
201
203
 
204
+ def redirect_client
205
+ return yield
206
+ rescue RestClient::Exception => exception
207
+ if [301, 302, 307].include?(exception.response.code)
208
+ redirect_to exception.response.headers[:location]
209
+ nil
210
+ else
211
+ raise exception
212
+ end
213
+ end
214
+
202
215
  def pull_blob
203
- r = Resources::Registry::Proxy.get(@_request.fullpath, 'Accept' => request.headers['Accept'])
204
- render json: r
216
+ headers = {}
217
+ headers['Accept'] = request.headers['Accept'] if request.headers['Accept']
218
+ if (blob_response = redirect_client { Resources::Registry::Proxy.get(@_request.fullpath, headers, max_redirects: 0) })
219
+ #when pulp 2 is removed, this should no longer be needed, and all clients should be redirected
220
+ render json: blob_response
221
+ end
205
222
  end
206
223
 
207
224
  def push_manifest
@@ -476,7 +493,9 @@ module Katello
476
493
  end
477
494
 
478
495
  def confirm_settings
479
- return true if SETTINGS.dig(:katello, :container_image_registry)
496
+ if SETTINGS.dig(:katello, :container_image_registry) || SmartProxy.pulp_primary&.pulp3_repository_type_support?(::Katello::Repository::DOCKER_TYPE)
497
+ return true
498
+ end
480
499
  render_error('custom_error', :status => :not_found,
481
500
  :locals => { :message => "Registry not configured" })
482
501
  end
@@ -10,7 +10,7 @@ module Katello
10
10
  before_action :find_host, :only => [:upload_package_profile, :upload_profiles, :deb_package_profile]
11
11
  before_action :authorize_client_or_user, :only => [:upload_package_profile, :upload_profiles, :deb_package_profile]
12
12
 
13
- skip_before_action :check_content_type
13
+ skip_before_action :check_media_type
14
14
 
15
15
  #api :PUT, "/consumers/:id/packages", N_("Update installed packages")
16
16
  #api :PUT, "/consumers/:id/profile", N_("Update installed packages")
@@ -26,7 +26,7 @@ module Katello
26
26
  before_action :set_organization_id, :except => [:hypervisors_update, :async_hypervisors_update]
27
27
  before_action :find_hypervisor_organization, :only => [:async_hypervisors_update, :hypervisors_update]
28
28
 
29
- before_action :check_content_type, :except => :async_hypervisors_update
29
+ before_action :check_media_type, :except => :async_hypervisors_update
30
30
 
31
31
  prepend_before_action :convert_owner_to_organization_id, :except => [:hypervisors_update, :async_hypervisors_update], :if => lambda { params.key?(:owner) }
32
32
  prepend_before_action :convert_organization_label_to_id, :only => [:rhsm_index, :consumer_activate, :consumer_create], :if => lambda { params.key?(:organization_id) }
@@ -119,7 +119,9 @@ module Katello
119
119
  # Note that this request comes in as content-type 'text/plain' so that
120
120
  # tomcat won't parse the json. Here we just pass the plain body through to candlepin
121
121
  def async_hypervisors_update
122
- task = Katello::Resources::Candlepin::Consumer.async_hypervisors(params[:owner], request.raw_post)
122
+ task = Katello::Resources::Candlepin::Consumer.async_hypervisors(owner: params[:owner],
123
+ reporter_id: params[:reporter_id],
124
+ raw_json: request.raw_post)
123
125
  async_task(::Actions::Katello::Host::Hypervisors, nil, :task_id => task['id'])
124
126
 
125
127
  render :json => task
@@ -6,11 +6,11 @@ module Katello
6
6
  before_action :find_environment, :only => [:index, :create, :update]
7
7
  before_action :find_optional_organization, :only => [:index, :create, :show]
8
8
  before_action :find_content_view, :only => [:index]
9
- before_action :find_activation_key, :only => [:show, :update, :destroy, :available_releases, :copy, :product_content,
10
- :available_host_collections, :add_host_collections, :remove_host_collections,
11
- :content_override, :add_subscriptions, :remove_subscriptions,
12
- :subscriptions]
13
- before_action :authorize
9
+ before_action :find_authorized_katello_resource, :only => [:show, :update, :destroy, :available_releases, :product_content,
10
+ :available_host_collections, :add_host_collections, :remove_host_collections,
11
+ :content_override, :add_subscriptions, :remove_subscriptions,
12
+ :subscriptions]
13
+ before_action :verify_simple_content_access_disabled, :only => [:add_subscriptions]
14
14
 
15
15
  wrap_parameters :include => (ActivationKey.attribute_names + %w(host_collection_ids service_level auto_attach purpose_role purpose_usage purpose_addons content_view_environment))
16
16
 
@@ -95,6 +95,9 @@ module Katello
95
95
  param :id, :number, :desc => N_("ID of the activation key"), :required => true
96
96
  param :organization_id, :number, :desc => N_("organization identifier"), :required => false
97
97
  def copy
98
+ @activation_key = Katello::ActivationKey.readable.find_by(:id => params[:id])
99
+ throw_resource_not_found(name: 'activation_key', id: params[:id]) if @activation_key.nil?
100
+
98
101
  fail HttpErrors::BadRequest, _("New name cannot be blank") unless params[:new_name]
99
102
  @new_activation_key = @activation_key.copy(params[:new_name])
100
103
  @new_activation_key.user = current_user
@@ -254,12 +257,6 @@ module Katello
254
257
  activation_keys
255
258
  end
256
259
 
257
- def find_activation_key
258
- @activation_key = ActivationKey.find(params[:id])
259
- fail HttpErrors::NotFound, _("Couldn't find activation key '%s'") % params[:id] if @activation_key.nil?
260
- @activation_key
261
- end
262
-
263
260
  private
264
261
 
265
262
  def subscription_index
@@ -279,7 +276,7 @@ module Katello
279
276
  environment_id = params[:environment][:id] if !environment_id && params[:environment]
280
277
  return unless environment_id
281
278
 
282
- @environment = KTEnvironment.find(environment_id)
279
+ @environment = KTEnvironment.readable.find_by(id: environment_id)
283
280
  fail HttpErrors::NotFound, _("Couldn't find environment '%s'") % params[:environment_id] if @environment.nil?
284
281
  @organization = @environment.organization
285
282
  @environment
@@ -290,7 +287,7 @@ module Katello
290
287
  @host_collections = []
291
288
 
292
289
  ids&.each do |host_collection_id|
293
- host_collection = HostCollection.find(host_collection_id)
290
+ host_collection = HostCollection.readable.find(host_collection_id)
294
291
  fail HttpErrors::NotFound, _("Couldn't find host collection '%s'") % host_collection_id if host_collection.nil?
295
292
  @host_collections << host_collection
296
293
  end
@@ -304,7 +301,7 @@ module Katello
304
301
  def find_content_view
305
302
  if params.include?(:content_view_id)
306
303
  cv_id = params[:content_view_id]
307
- @content_view = ContentView.find_by(:id => cv_id)
304
+ @content_view = ContentView.readable.find_by(:id => cv_id)
308
305
  fail HttpErrors::NotFound, _("Couldn't find content view '%s'") % cv_id if @content_view.nil?
309
306
  end
310
307
  end
@@ -348,5 +345,11 @@ module Katello
348
345
 
349
346
  key_params
350
347
  end
348
+
349
+ def verify_simple_content_access_disabled
350
+ if @activation_key.organization.simple_content_access?
351
+ fail HttpErrors::BadRequest, _("The specified organization is in Simple Content Access mode. Attaching subscriptions is disabled")
352
+ end
353
+ end
351
354
  end
352
355
  end
@@ -5,7 +5,7 @@ module Katello
5
5
  include Api::V2::Rendering
6
6
  include Api::V2::ErrorHandling
7
7
  include ::Foreman::Controller::CsvResponder
8
- include Concerns::Api::V2::AssociationsPermissionCheck
8
+ include Concerns::Api::V2::Authorization
9
9
 
10
10
  # support for session (thread-local) variables must be the last filter in this class
11
11
  include Foreman::ThreadSession::Cleaner
@@ -1,10 +1,9 @@
1
1
  module Katello
2
2
  class Api::V2::ContentCredentialsController < Api::V2::ApiController
3
3
  include Katello::Concerns::FilteredAutoCompleteSearch
4
- before_action :authorize
5
4
  before_action :find_organization, :only => [:create, :index, :auto_complete_search]
6
- before_action :find_content_credential, :only => [:show, :update, :destroy, :content, :set_content]
7
- skip_before_action :check_content_type, :only => [:create, :content, :set_content]
5
+ before_action :find_authorized_katello_resource, :only => [:show, :update, :destroy, :content, :set_content]
6
+ skip_before_action :check_media_type, :only => [:create, :content, :set_content]
8
7
 
9
8
  def resource_class
10
9
  Katello::GpgKey
@@ -103,12 +102,6 @@ module Katello
103
102
 
104
103
  protected
105
104
 
106
- def find_content_credential
107
- @content_credential = GpgKey.find(params[:id])
108
- rescue ActiveRecord::RecordNotFound
109
- raise HttpErrors::NotFound, _("Couldn't find Content Credential '%s'") % params[:id]
110
- end
111
-
112
105
  def content_credential_params
113
106
  params.permit(:name, :content_type, :content)
114
107
  end
@@ -1,7 +1,7 @@
1
1
  module Katello
2
2
  class Api::V2::ContentUploadsController < Api::V2::ApiController
3
3
  before_action :find_repository
4
- skip_before_action :check_content_type, :only => [:update]
4
+ skip_before_action :check_media_type, :only => [:update]
5
5
 
6
6
  include ::Foreman::Controller::FilterParameters
7
7
  filter_parameters :content
@@ -13,8 +13,8 @@ module Katello
13
13
  param :content_type, RepositoryTypeManager.uploadable_content_types.map(&:label), :required => false, :desc => N_("content type ('deb', 'docker_manifest', 'file', 'ostree', 'puppet_module', 'rpm', 'srpm')")
14
14
  def create
15
15
  content_type = params[:content_type] || ::Katello::RepositoryTypeManager.find(@repository.content_type).default_managed_content_type.label
16
- unit_type_id = SmartProxy.pulp_master.content_service(content_type).content_type
17
- render :json => @repository.backend_content_service(::SmartProxy.pulp_master).create_upload(params[:size], params[:checksum], unit_type_id)
16
+ unit_type_id = SmartProxy.pulp_primary.content_service(content_type).content_type
17
+ render :json => @repository.backend_content_service(::SmartProxy.pulp_primary).create_upload(params[:size], params[:checksum], unit_type_id)
18
18
  end
19
19
 
20
20
  api :PUT, "/repositories/:repository_id/content_uploads/:id", N_("Upload a chunk of the file's content")
@@ -24,7 +24,7 @@ module Katello
24
24
  param :offset, :number, :required => true, :desc => N_("The offset in the file where the content starts")
25
25
  param :content, File, :required => true, :desc => N_("The actual file contents")
26
26
  def update
27
- @repository.backend_content_service(::SmartProxy.pulp_master)
27
+ @repository.backend_content_service(::SmartProxy.pulp_primary)
28
28
  .upload_chunk(params[:id], params[:offset], params[:content], params[:size])
29
29
  head :no_content
30
30
  end
@@ -33,7 +33,7 @@ module Katello
33
33
  param :repository_id, :number, :required => true, :desc => N_("Repository id")
34
34
  param :id, String, :required => true, :desc => N_("Upload request id")
35
35
  def destroy
36
- @repository.backend_content_service(::SmartProxy.pulp_master).delete_upload(params[:id])
36
+ @repository.backend_content_service(::SmartProxy.pulp_primary).delete_upload(params[:id])
37
37
  head :no_content
38
38
  end
39
39
 
@@ -1,7 +1,8 @@
1
1
  module Katello
2
2
  class Api::V2::ContentViewComponentsController < Api::V2::ApiController
3
- before_action :find_composite_content_view
4
- before_action :find_content_view_component, :only => [:show, :update]
3
+ before_action :find_composite_content_view, :only => [:show, :index]
4
+ before_action :find_composite_content_view_for_edit, :only => [:add_components, :remove_components, :update]
5
+ before_action :find_authorized_katello_resource, :only => [:show, :update]
5
6
 
6
7
  wrap_parameters :include => %w(composite_content_view_id content_view_version_id content_view_id latest)
7
8
 
@@ -13,7 +14,7 @@ module Katello
13
14
  end
14
15
 
15
16
  def index_response
16
- results = @view.content_view_components
17
+ results = @view.content_view_components.readable
17
18
  {
18
19
  :results => results.uniq,
19
20
  :subtotal => results.count,
@@ -31,15 +32,26 @@ module Katello
31
32
  param :latest, :bool, :desc => N_("true if the latest version of the component's content view is desired")
32
33
  end
33
34
  def add_components
35
+ @view.add_components(authorized_components)
36
+ @view.save!
37
+ respond_for_index(:collection => index_response, :template => "index")
38
+ end
39
+
40
+ private def authorized_components
34
41
  components = params.require(:components).map do |component|
35
42
  component = component.permit([:latest, :content_view_version_id, :content_view_id])
36
43
  options = {}
37
44
  options[:latest] = ::Foreman::Cast.to_bool(component[:latest]) if component.key?(:latest)
38
- options.merge(component.slice(:content_view_version_id, :content_view_id))
45
+ options.merge(component.slice(:content_view_version_id, :content_view_id)).with_indifferent_access
46
+ end
47
+
48
+ components.each do |component|
49
+ if component[:content_view_version_id] && Katello::ContentViewVersion.readable.find_by(id: component[:content_view_version_id]).nil?
50
+ throw_resource_not_found(name: 'content_view_version', id: component[:content_view_version_id])
51
+ elsif component[:content_view_id] && Katello::ContentView.readable.find_by(id: component[:content_view_id]).nil?
52
+ throw_resource_not_found(name: 'content_view', id: component[:content_view_id])
53
+ end
39
54
  end
40
- @view.add_components(components)
41
- @view.save!
42
- respond_for_index(:collection => index_response, :template => "index")
43
55
  end
44
56
 
45
57
  api :PUT, "/content_views/:composite_content_view_id/content_view_components/remove",
@@ -56,7 +68,7 @@ module Katello
56
68
  param :composite_content_view_id, :number, :desc => N_("composite content view numeric identifier"), :required => true
57
69
  param :id, :number, :desc => N_("content view component ID. Identifier of the component association"), :required => true
58
70
  def show
59
- respond :resource => @component
71
+ respond :resource => @content_view_component
60
72
  end
61
73
 
62
74
  api :PUT, "/content_views/:composite_content_view_id/content_view_components/:id",
@@ -67,6 +79,9 @@ module Katello
67
79
  param :latest, :bool, :desc => N_("true if the latest version of the components content view is desired")
68
80
  def update
69
81
  cvv_id = component_params[:content_view_version_id]
82
+ if cvv_id && Katello::ContentViewVersion.readable.find_by(id: cvv_id).nil?
83
+ throw_resource_not_found(name: 'content view version', id: cvv_id)
84
+ end
70
85
  if component_params.key?(:latest) && component_params.key?(:content_view_version_id)
71
86
  latest = ::Foreman::Cast.to_bool(component_params[:latest])
72
87
  if latest && cvv_id.present?
@@ -75,22 +90,24 @@ module Katello
75
90
  end
76
91
  end
77
92
  if cvv_id.present?
78
- @component.update!(:content_view_version_id => cvv_id, :latest => false)
93
+ @content_view_component.update!(:content_view_version_id => cvv_id, :latest => false)
79
94
  elsif component_params.key?(:latest)
80
95
  latest = ::Foreman::Cast.to_bool(component_params[:latest])
81
- @component.update!(:content_view_version_id => nil, :latest => latest)
96
+ @content_view_component.update!(:content_view_version_id => nil, :latest => latest)
82
97
  end
83
- respond :resource => @component
98
+ respond :resource => @content_view_component
84
99
  end
85
100
 
86
101
  private
87
102
 
88
103
  def find_composite_content_view
89
- @view = ContentView.composite.non_default.find(params[:composite_content_view_id])
104
+ @view = ContentView.composite.non_default.readable.find_by(id: params[:composite_content_view_id])
105
+ throw_resource_not_found(name: 'composite content view', id: params[:composite_content_view_id]) if @view.nil?
90
106
  end
91
107
 
92
- def find_content_view_component
93
- @component = ContentViewComponent.find(params[:id])
108
+ def find_composite_content_view_for_edit
109
+ @view = ContentView.composite.non_default.editable.find_by(id: params[:composite_content_view_id])
110
+ throw_resource_not_found(name: 'composite content view', id: params[:composite_content_view_id]) if @view.nil?
94
111
  end
95
112
 
96
113
  def component_params
@@ -0,0 +1,48 @@
1
+ module Katello
2
+ class Api::V2::ContentViewRepositoriesController < Api::V2::ApiController
3
+ # There are other Content View Repository related endpoints that are in RepositoriesController
4
+ include Katello::Concerns::FilteredAutoCompleteSearch
5
+
6
+ before_action :find_content_view
7
+ before_action :find_organization_from_cv
8
+
9
+ # content_views/:id/repositories/show_all
10
+ # Shows all repositories, added and available to add, for a content view
11
+ # Undocumented endpoint since the functionality exists in separate calls already.
12
+ # This was created for ease of pagination and search for the UI
13
+ param :id, :number, desc: N_("Content View id"), required: true
14
+ def show_all
15
+ kr = Katello::Repository.table_name
16
+ krr = Katello::RootRepository.table_name
17
+ kcvr = Katello::ContentViewRepository.table_name
18
+ join_query = <<-SQL
19
+ LEFT OUTER JOIN #{kcvr}
20
+ ON #{kr}.id = #{kcvr}.repository_id
21
+ AND #{kcvr}.content_view_id = #{@content_view.id}
22
+ SQL
23
+ order_query = <<-SQL
24
+ CAST (#{kcvr}.repository_id as BOOLEAN) ASC, #{krr}.name
25
+ SQL
26
+
27
+ query = Katello::Repository.readable.in_default_view.in_organization(@organization)
28
+ query = query.with_type(params[:content_type]) if params[:content_type]
29
+ # Use custom sort to perform the join and order since we need to order by specific content_view
30
+ # and the ORDER BY query needs access to the katello_content_view_repositories table
31
+ custom_sort = ->(sort_query) { sort_query.joins(:root).joins(join_query).order(order_query) }
32
+ options = { resource_class: Katello::Repository, custom_sort: custom_sort }
33
+ repos = scoped_search(query, nil, nil, options)
34
+
35
+ respond_for_index(:collection => repos)
36
+ end
37
+
38
+ private
39
+
40
+ def find_content_view
41
+ @content_view = ContentView.find(params[:content_view_id])
42
+ end
43
+
44
+ def find_organization_from_cv
45
+ @organization = @content_view.organization
46
+ end
47
+ end
48
+ end