lib/contrast/config/protect_rule_configuration.rb in contrast-agent-6.7.0 vs lib/contrast/config/protect_rule_configuration.rb in contrast-agent-6.8.0
- old
+ new
@@ -31,27 +31,27 @@
def detect_custom_code_accessing_system_files
@detect_custom_code_accessing_system_files.nil? ? true : @detect_custom_code_accessing_system_files
end
# To convert the user input mode from config to a standard format used by TS & SR, we need to convert the given
- # String to its Contrast::Api::Settings::ProtectionRule::Mode equivalent. If a nonsense value is provided, it'll
+ # String to its recognized symbol equivalent. If a nonsense value is provided, it'll
# be treated the same as disabling the rule.
#
- # @return [Contrast::Api::Settings::ProtectionRule::Mode, nil]
+ # @return [Symbol]
def applicable_mode
return unless mode
case mode
when 'permit'
- Contrast::Api::Settings::ProtectionRule::Mode::PERMIT
+ :PERMIT
when 'block_at_perimeter'
- Contrast::Api::Settings::ProtectionRule::Mode::BLOCK_AT_PERIMETER
+ :BLOCK_AT_PERIMETER
when 'block'
- Contrast::Api::Settings::ProtectionRule::Mode::BLOCK
+ :BLOCK
when 'monitor'
- Contrast::Api::Settings::ProtectionRule::Mode::MONITOR
+ :MONITOR
else
- Contrast::Api::Settings::ProtectionRule::Mode::NO_ACTION
+ :NO_ACTION
end
end
end
end
end