Project

General

Profile

« Previous | Next » 

Revision dad774bb

Added by Adam Ruzicka almost 5 years ago

Fixes #27549 - Do not show encrypted setting in webui in clear

This reuses the HiddenValue module and shows only asterisks instead of
the full value for encrypted settings.

View differences:

test/models/setting_test.rb
end
end
def test_should_hide_value_if_encrypted
setting = Setting.create(name: 'encrypted', value: 'clear', encrypted: true)
assert_equal '*****', setting.safe_value
end
def test_should_provide_default_if_no_value_defined
assert Setting.create(:name => "foo", :default => 5, :description => "test foo")
assert_equal 5, Setting["foo"]

Also available in: Unified diff