From 2a7d096ff2ae1de5e4d29b8d860ef6d46ffb5145 Mon Sep 17 00:00:00 2001 From: Ron Lavi <1ronlavi@gmail.com> Date: Mon, 11 Jul 2022 13:08:39 +0300 Subject: [PATCH] Fixes #35188 - fix puppet plugin detection for permissions issues (#573) the discovery detection for puppet plugin presence didn't work (cherry picked from commit ea10b983b5e09f085c795757b56e1f7307d16f0b) --- lib/foreman_discovery/engine.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/foreman_discovery/engine.rb b/lib/foreman_discovery/engine.rb index 78f6068f..1f10c2d8 100644 --- a/lib/foreman_discovery/engine.rb +++ b/lib/foreman_discovery/engine.rb @@ -310,7 +310,7 @@ class Engine < ::Rails::Engine :edit_discovery_rules, :destroy_discovery_rules, ] - if defined?(ForemanPuppet::VERSION) + if defined?(ForemanPuppet::Engine) MANAGER += [ :view_environments, :view_puppetclasses ] end role "Discovery Reader", READER, "Role granting permissions to view discovered hosts"