-
Bug
-
Resolution: Unresolved
-
Critical
-
None
-
6.15.5.2, 6.16.5.2
Description of problem: The non-admin users created on Satellite having the viewer role assigned unable to view the hostgroup.
How reproducible: Yes
Is this issue a regression from an earlier version: Yes
This has been observed on 6.15.5.2, 6.16 version.
Steps to Reproduce:
1. Install Satellite
2. Create a hostgroup as admin
3. Create a new user, set the role of viewer
4. Log as user and try to access the hostgroup page
Actual behavior: The hostgroup page returns the following error:
Error: Oops, we're sorry but something went wrong undefined method `html_safe' for #<Hash:0x000055e8efd73498> Did you mean? html_safe?
Expected behavior: The user should see the hostgroup
Business Impact / Additional info:
I see an old Jira https://issues.redhat.com/browse/SAT-19715 with same behavior which was fixed in Sat 6.15.0 release.
logs
# foreman-rake errors:fetch_log request_id=e8d36077 Foreman version: 3.9.1.12 Plugins: - foreman-tasks 9.0.4 - foreman_ansible 13.0.7 - foreman_azure_rm 2.2.10 - foreman_bootdisk 21.2.2 - foreman_discovery 23.0.1 - foreman_google 1.0.4 - foreman_hooks 0.3.17 - foreman_leapp 1.1.1 - foreman_openscap 7.1.1 - foreman_remote_execution 12.0.7 - foreman_rh_cloud 9.0.60 - foreman_templates 9.4.0 - foreman_theme_satellite 13.3.0 - foreman_virt_who_configure 0.5.20 - foreman_webhooks 3.2.2 - katello 4.11.0.20 2025-09-17T18:52:43 [I|app|e8d36077] Started GET "/hostgroups" for 10.74.64.208 at 2025-09-17 18:52:43 +0530 2025-09-17T18:52:43 [I|app|e8d36077] Processing by HostgroupsController#index as HTML 2025-09-17T18:52:43 [I|app|e8d36077] Rendered hostgroups/index.html.erb within layouts/application (Duration: 57.8ms | Allocations: 33954) 2025-09-17T18:52:43 [I|app|e8d36077] Rendered layout layouts/application.html.erb (Duration: 57.9ms | Allocations: 34009) 2025-09-17T18:52:43 [W|app|e8d36077] undefined method `html_safe' for #<Hash:0x000055e8efd73498> e8d36077 | Did you mean? html_safe? 2025-09-17T18:52:43 [I|app|e8d36077] Backtrace for 'undefined method `html_safe' for #<Hash:0x000055e8efd73498> e8d36077 | Did you mean? html_safe?' error (ActionView::Template::Error): undefined method `html_safe' for #<Hash:0x000055e8efd73498> e8d36077 | Did you mean? html_safe? e8d36077 | /usr/share/foreman/app/helpers/application_helper.rb:257:in `action_buttons' e8d36077 | /usr/share/foreman/app/helpers/hostgroups_helper.rb:32:in `hostgroup_actions_dropdown' e8d36077 | /usr/share/foreman/app/views/hostgroups/index.html.erb:27:in `block in _e9e3a5fa7afebc43a3b1bfa92b0df472' e8d36077 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/relation/delegation.rb:88:in `each' e8d36077 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/relation/delegation.rb:88:in `each' e8d36077 | /usr/share/foreman/app/views/hostgroups/index.html.erb:15:in `_e9e3a5fa7afebc43a3b1bfa92b0df472' e8d36077 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/base.rb:247:in `public_send' e8d36077 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/base.rb:247:in `_run' e8d36077 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/template.rb:154:in `block in render' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications.rb:205:in `instrument' e8d36077 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/template.rb:345:in `instrument_render_template' e8d36077 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/template.rb:152:in `render' e8d36077 | /usr/share/gems/gems/deface-1.5.3/lib/deface/action_view_extensions.rb:43:in `render' e8d36077 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/renderer/template_renderer.rb:61:in `block (2 levels) in render_template' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications.rb:203:in `block in instrument' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications.rb:203:in `instrument' e8d36077 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/renderer/template_renderer.rb:56:in `block in render_template' e8d36077 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/renderer/template_renderer.rb:71:in `block in render_with_layout' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications.rb:203:in `block in instrument' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications.rb:203:in `instrument' e8d36077 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/renderer/template_renderer.rb:70:in `render_with_layout' e8d36077 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/renderer/template_renderer.rb:55:in `render_template' e8d36077 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/renderer/template_renderer.rb:11:in `render' e8d36077 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/renderer/renderer.rb:61:in `render_template_to_object' e8d36077 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/renderer/renderer.rb:29:in `render_to_object' e8d36077 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/rendering.rb:117:in `block in _render_template' e8d36077 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/base.rb:273:in `in_rendering_context' e8d36077 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/rendering.rb:116:in `_render_template' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/streaming.rb:218:in `_render_template' e8d36077 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/rendering.rb:103:in `render_to_body' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/rendering.rb:52:in `render_to_body' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/renderers.rb:142:in `render_to_body' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/abstract_controller/rendering.rb:25:in `render' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/rendering.rb:36:in `render' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/instrumentation.rb:46:in `block (2 levels) in render' e8d36077 | /usr/share/ruby/benchmark.rb:308:in `realtime' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/core_ext/benchmark.rb:14:in `ms' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/instrumentation.rb:46:in `block in render' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/instrumentation.rb:86:in `cleanup_view_runtime' e8d36077 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/railties/controller_runtime.rb:34:in `cleanup_view_runtime' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/instrumentation.rb:45:in `render' e8d36077 | /usr/share/foreman/app/controllers/hostgroups_controller.rb:16:in `block (2 levels) in index' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/mime_responds.rb:214:in `respond_to' e8d36077 | /usr/share/foreman/app/controllers/hostgroups_controller.rb:13:in `index' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/abstract_controller/base.rb:228:in `process_action' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/rendering.rb:30:in `process_action' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/abstract_controller/callbacks.rb:42:in `block in process_action' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:117:in `block in run_callbacks' e8d36077 | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks' e8d36077 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks' e8d36077 | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks' e8d36077 | /usr/share/gems/gems/audited-5.4.2/lib/audited/sweeper.rb:16:in `around' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks' e8d36077 | /usr/share/gems/gems/audited-5.4.2/lib/audited/sweeper.rb:16:in `around' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:137:in `run_callbacks' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/abstract_controller/callbacks.rb:41:in `process_action' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/rescue.rb:22:in `process_action' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications.rb:203:in `block in instrument' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/notifications.rb:203:in `instrument' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/instrumentation.rb:33:in `process_action' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal/params_wrapper.rb:249:in `process_action' e8d36077 | /usr/share/gems/gems/activerecord-6.1.7.7/lib/active_record/railties/controller_runtime.rb:27:in `process_action' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/abstract_controller/base.rb:165:in `process' e8d36077 | /usr/share/gems/gems/actionview-6.1.7.7/lib/action_view/rendering.rb:39:in `process' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal.rb:190:in `dispatch' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_controller/metal.rb:254:in `dispatch' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/route_set.rb:50:in `dispatch' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/route_set.rb:33:in `serve' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/journey/router.rb:50:in `block in serve' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/journey/router.rb:32:in `each' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/journey/router.rb:32:in `serve' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/routing/route_set.rb:842:in `call' e8d36077 | /usr/share/gems/gems/katello-4.11.0.20/lib/katello/middleware/organization_created_enforcer.rb:18:in `call' e8d36077 | /usr/share/gems/gems/katello-4.11.0.20/lib/katello/middleware/event_daemon.rb:10:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call' e8d36077 | /usr/share/gems/gems/apipie-dsl-2.6.1/lib/apipie_dsl/static_dispatcher.rb:67:in `call' e8d36077 | /usr/share/gems/gems/apipie-rails-1.2.3/lib/apipie/static_dispatcher.rb:68:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/static.rb:24:in `call' e8d36077 | /usr/share/foreman/lib/foreman/middleware/libvirt_connection_cleaner.rb:9:in `call' e8d36077 | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in `call' e8d36077 | /usr/share/gems/gems/apipie-rails-1.2.3/lib/apipie/middleware/checksum_in_headers.rb:27:in `call' e8d36077 | /usr/share/gems/gems/rack-2.2.13/lib/rack/tempfile_reaper.rb:15:in `call' e8d36077 | /usr/share/gems/gems/rack-2.2.13/lib/rack/etag.rb:27:in `call' e8d36077 | /usr/share/gems/gems/rack-2.2.13/lib/rack/conditional_get.rb:27:in `call' e8d36077 | /usr/share/gems/gems/rack-2.2.13/lib/rack/head.rb:12:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/http/permissions_policy.rb:22:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/http/content_security_policy.rb:19:in `call' e8d36077 | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call' e8d36077 | /usr/share/gems/gems/rack-2.2.13/lib/rack/session/abstract/id.rb:266:in `context' e8d36077 | /usr/share/gems/gems/rack-2.2.13/lib/rack/session/abstract/id.rb:260:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/cookies.rb:697:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:98:in `run_callbacks' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/callbacks.rb:26:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call' e8d36077 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/rack/logger.rb:37:in `call_app' e8d36077 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/rack/logger.rb:28:in `call' e8d36077 | /usr/share/gems/gems/sprockets-rails-3.4.2/lib/sprockets/rails/quiet_assets.rb:13:in `call' e8d36077 | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/remote_ip.rb:81:in `call' e8d36077 | /usr/share/gems/gems/request_store-1.5.1/lib/request_store/middleware.rb:19:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/request_id.rb:26:in `call' e8d36077 | /usr/share/gems/gems/katello-4.11.0.20/lib/katello/prevent_json_parsing.rb:12:in `call' e8d36077 | /usr/share/gems/gems/rack-2.2.13/lib/rack/method_override.rb:24:in `call' e8d36077 | /usr/share/gems/gems/rack-2.2.13/lib/rack/runtime.rb:22:in `call' e8d36077 | /usr/share/gems/gems/activesupport-6.1.7.7/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/executor.rb:14:in `call' e8d36077 | /usr/share/gems/gems/rack-2.2.13/lib/rack/sendfile.rb:110:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/ssl.rb:77:in `call' e8d36077 | /usr/share/gems/gems/actionpack-6.1.7.7/lib/action_dispatch/middleware/host_authorization.rb:142:in `call' e8d36077 | /usr/share/gems/gems/secure_headers-6.5.0/lib/secure_headers/middleware.rb:11:in `call' e8d36077 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/engine.rb:539:in `call' e8d36077 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/railtie.rb:207:in `public_send' e8d36077 | /usr/share/gems/gems/railties-6.1.7.7/lib/rails/railtie.rb:207:in `method_missing' e8d36077 | /usr/share/gems/gems/rack-2.2.13/lib/rack/urlmap.rb:74:in `block in call' e8d36077 | /usr/share/gems/gems/rack-2.2.13/lib/rack/urlmap.rb:58:in `each' e8d36077 | /usr/share/gems/gems/rack-2.2.13/lib/rack/urlmap.rb:58:in `call' e8d36077 | /usr/share/gems/gems/puma-6.4.2/lib/puma/configuration.rb:272:in `call' e8d36077 | /usr/share/gems/gems/puma-6.4.2/lib/puma/request.rb:100:in `block in handle_request' e8d36077 | /usr/share/gems/gems/puma-6.4.2/lib/puma/thread_pool.rb:378:in `with_force_shutdown' e8d36077 | /usr/share/gems/gems/puma-6.4.2/lib/puma/request.rb:99:in `handle_request' e8d36077 | /usr/share/gems/gems/puma-6.4.2/lib/puma/server.rb:464:in `process_client' e8d36077 | /usr/share/gems/gems/puma-6.4.2/lib/puma/server.rb:245:in `block in run' e8d36077 | /usr/share/gems/gems/puma-6.4.2/lib/puma/thread_pool.rb:155:in `block in spawn_thread' e8d36077 | /usr/share/gems/gems/logging-2.3.1/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context' 2025-09-17T18:52:43 [I|app|e8d36077] Rendered common/500.html.erb within layouts/application (Duration: 6.2ms | Allocations: 9001) 2025-09-17T18:52:43 [I|app|e8d36077] Rendered layouts/base.html.erb (Duration: 10.2ms | Allocations: 20325) 2025-09-17T18:52:43 [I|app|e8d36077] Rendered layout layouts/application.html.erb (Duration: 22.3ms | Allocations: 42166) 2025-09-17T18:52:43 [I|app|e8d36077] Completed 500 Internal Server Error in 108ms (Views: 22.9ms | ActiveRecord: 19.4ms | Allocations: 86323)