From f31d4ac29a19cdb45494c6dc890be67e922d03ad Mon Sep 17 00:00:00 2001 From: Milan Zazrivec Date: Fri, 24 Mar 2017 11:50:10 +0100 Subject: [PATCH] Fix password placeholders in credential summary --- app/helpers/ansible_credential_helper/textual_summary.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/helpers/ansible_credential_helper/textual_summary.rb b/app/helpers/ansible_credential_helper/textual_summary.rb index 9f55e3cb321..d82c9679080 100644 --- a/app/helpers/ansible_credential_helper/textual_summary.rb +++ b/app/helpers/ansible_credential_helper/textual_summary.rb @@ -16,7 +16,13 @@ def textual_group_options options << key define_singleton_method "textual_#{key}" do - {:label => _(value[:label]), :value => value[:type] == :password ? '*****' : @record.options[key], :title => _(value[:help_text])} + h = {:label => _(value[:label]), :title => _(value[:help_text])} + h[:value] = if value[:type] == :password && @record.options[key].present? + '●●●●●●●●' + else + @record.options[key] + end + h end end