diff --git a/lib/foreman_discovery/engine.rb b/lib/foreman_discovery/engine.rb index 737fecb7..905ab955 100644 --- a/lib/foreman_discovery/engine.rb +++ b/lib/foreman_discovery/engine.rb @@ -309,10 +309,7 @@ class Engine < ::Rails::Engine :execute_discovery_rules, :edit_discovery_rules, :destroy_discovery_rules, - ] - if defined?(ForemanPuppet::Engine) - MANAGER += [ :view_environments, :view_puppetclasses ] - end + ] + (defined?(ForemanPuppet::Engine) ? [ :view_environments, :view_puppetclasses ] : []) role "Discovery Reader", READER, "Role granting permissions to view discovered hosts" role "Discovery Manager", MANAGER, "Role granting permissions to perform provisioning of discovered hosts"