Skip to content

Commit

Permalink
Fix password placeholders in credential summary
Browse files Browse the repository at this point in the history
  • Loading branch information
mzazrivec committed Mar 24, 2017
1 parent fa94914 commit f31d4ac
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/helpers/ansible_credential_helper/textual_summary.rb
Expand Up @@ -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

Expand Down

0 comments on commit f31d4ac

Please sign in to comment.