From 79c28ddb2d99cbf75ffda50008b719b413afb4e7 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Wed, 16 Aug 2023 09:27:08 +0200 Subject: [PATCH] Fixes #36684 - allow single_content_view in ContentFacet::Jail Otherwise the Ansible Inventory report template doesn't render properly when Safe Mode is on. Same for single_lifecycle_environment and KTEnvironment#id. Fixes: c33da7a3fa9473add44a154feba4e57f34b2b289 --- app/models/katello/host/content_facet.rb | 3 ++- app/models/katello/kt_environment.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/katello/host/content_facet.rb b/app/models/katello/host/content_facet.rb index ef6608e6021..1cda11f8b72 100644 --- a/app/models/katello/host/content_facet.rb +++ b/app/models/katello/host/content_facet.rb @@ -380,7 +380,8 @@ class Jail < ::Safemode::Jail allow :applicable_deb_count, :applicable_module_stream_count, :applicable_rpm_count, :content_source, :content_source_id, :content_source_name, :errata_counts, :id, :kickstart_repository, :kickstart_repository_id, :kickstart_repository_name, :upgradable_deb_count, :upgradable_module_stream_count, :upgradable_rpm_count, :uuid, - :installable_security_errata_count, :installable_bugfix_errata_count, :installable_enhancement_errata_count + :installable_security_errata_count, :installable_bugfix_errata_count, :installable_enhancement_errata_count, + :single_content_view, :single_lifecycle_environment end end end diff --git a/app/models/katello/kt_environment.rb b/app/models/katello/kt_environment.rb index 3f91b9d93a3..a6de606fa64 100644 --- a/app/models/katello/kt_environment.rb +++ b/app/models/katello/kt_environment.rb @@ -278,7 +278,7 @@ def self.permission_name prop_group :katello_basic_props, Katello::Model, meta: { friendly_name: 'Katello Environment' } end class Jail < ::Safemode::Jail - allow :name, :label + allow :id, :name, :label end private