Manage disable_password_reveal

A user can disable the password reveal button in the horizon UI via the
configuration. This change adds the ability to toggle this to True via
the puppet modules.

Change-Id: Iacf899d595a2a3c522df1b96ca527731937ec698
Related-Bug: #1640492
This commit is contained in:
Alex Schultz 2016-11-09 08:18:57 -07:00
parent 0e28cea0d3
commit ff13a2140f
4 changed files with 25 additions and 0 deletions

View File

@ -285,6 +285,10 @@
# (optional) Enables the use of 'Retrieve Password' in the Horizon Web UI.
# Defaults to false
#
# [*disable_password_reveal*]
# (optional) Disables the use of reveal button for passwords in the UI.
# Defaults to false
#
# === DEPRECATED group/name
#
# [*fqdn*]
@ -381,6 +385,7 @@ class horizon(
$password_autocomplete = 'off',
$images_panel = 'legacy',
$password_retrieve = false,
$disable_password_reveal = false,
# DEPRECATED PARAMETERS
$custom_theme_path = undef,
$fqdn = undef,

View File

@ -0,0 +1,3 @@
---
features:
- Added ability to configure disable_password_reveal

View File

@ -413,6 +413,20 @@ describe 'horizon' do
])
end
end
context 'with disable password reveal enabled' do
before do
params.merge!({
:disable_password_reveal => true
})
end
it 'disable_password_reveal is configured' do
verify_concat_fragment_contents(catalogue, 'local_settings.py', [
'HORIZON_CONFIG["disable_password_reveal"] = True',
])
end
end
end
shared_examples_for 'horizon on RedHat' do

View File

@ -136,6 +136,9 @@ HORIZON_CONFIG["password_autocomplete"] = "<%= @password_autocomplete %>"
# Setting this to True will disable the reveal button for password fields,
# including on the login form.
#HORIZON_CONFIG["disable_password_reveal"] = False
<% if @disable_password_reveal == true %>
HORIZON_CONFIG["disable_password_reveal"] = True
<% end %>
# Configure enabled image panel. It can be legacy or angular.
#HORIZON_CONFIG["images_panel"] = "legacy"