Module: ForemanOpentofu::AuthorizerPowerOverride
- Defined in:
- app/services/foreman_opentofu/authorizer_power_override.rb
Instance Method Summary collapse
-
#can?(permission, subject = nil, cache = true) ⇒ Boolean
Foreman calls can?(permission, subject, cache) with positional args.
Instance Method Details
#can?(permission, subject = nil, cache = true) ⇒ Boolean
Foreman calls can?(permission, subject, cache) with positional args. rubocop:disable Style/OptionalBooleanParameter
5 6 7 8 9 10 11 12 |
# File 'app/services/foreman_opentofu/authorizer_power_override.rb', line 5 def can?(, subject = nil, cache = true) if .to_s == 'power_hosts' && ForemanOpentofu::PowerCapability.power_change_disabled_for_host?(subject) return false end super(, subject, cache: cache) end |