Allow Optional Password Auto-Completion
Extends the class interface to allow the login form's password field to be automatically completed by the client browser. Defaults to 'off' to maintain backwards compatibility with previous releases. Change-Id: Id7e2ecd8502bb077679a2820ff0425ad519555d2
This commit is contained in:
parent
aaca6df3aa
commit
75b065b79c
@ -266,6 +266,11 @@
|
||||
# (optional) The default theme to use from list of available themes. Value should be theme_name.
|
||||
# Defaults to false
|
||||
#
|
||||
# [*password_autocomplete*]
|
||||
# (optional) Whether to instruct the client browser to autofill the login form password
|
||||
# Valid values are 'on' and 'off'
|
||||
# Defaults to 'off'
|
||||
#
|
||||
# === DEPRECATED group/name
|
||||
#
|
||||
# [*fqdn*]
|
||||
@ -359,6 +364,7 @@ class horizon(
|
||||
$vhost_extra_params = undef,
|
||||
$available_themes = false,
|
||||
$default_theme = false,
|
||||
$password_autocomplete = 'off',
|
||||
# DEPRECATED PARAMETERS
|
||||
$custom_theme_path = undef,
|
||||
$fqdn = undef,
|
||||
@ -430,6 +436,7 @@ class horizon(
|
||||
$keystone_options_real = merge($keystone_defaults, $keystone_options)
|
||||
$neutron_options_real = merge($neutron_defaults,$neutron_options)
|
||||
validate_hash($api_versions)
|
||||
validate_re($password_autocomplete, ['^on$', '^off$'])
|
||||
|
||||
if $cache_backend =~ /MemcachedCache/ {
|
||||
ensure_packages('python-memcache',
|
||||
|
@ -59,6 +59,7 @@ describe 'horizon' do
|
||||
"LOGIN_REDIRECT_URL = '#{platforms_params[:root_url]}/'",
|
||||
"ALLOWED_HOSTS = ['*', ]",
|
||||
" 'identity': 3,",
|
||||
'HORIZON_CONFIG["password_autocomplete"] = "off"',
|
||||
"SECRET_KEY = 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0'",
|
||||
'OPENSTACK_KEYSTONE_URL = "http://127.0.0.1:5000"',
|
||||
'OPENSTACK_KEYSTONE_DEFAULT_ROLE = "_member_"',
|
||||
@ -122,7 +123,8 @@ describe 'horizon' do
|
||||
{ 'name' => 'default', 'label' => 'Default', 'path' => 'themes/default' },
|
||||
{ 'name' => 'material', 'label' => 'Material', 'path' => 'themes/material' },
|
||||
],
|
||||
:default_theme => 'default'
|
||||
:default_theme => 'default',
|
||||
:password_autocomplete => 'on',
|
||||
})
|
||||
end
|
||||
|
||||
@ -135,6 +137,7 @@ describe 'horizon' do
|
||||
" 'identity': 2.0,",
|
||||
"OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True",
|
||||
"OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'domain.tld'",
|
||||
'HORIZON_CONFIG["password_autocomplete"] = "on"',
|
||||
"SECRET_KEY = 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0'",
|
||||
" 'DEAD_RETRY': 1,",
|
||||
" 'SERVER_RETRIES': 1,",
|
||||
|
@ -131,6 +131,7 @@ HORIZON_CONFIG = {
|
||||
# Turn off browser autocompletion for forms including the login form and
|
||||
# the database creation workflow if so desired.
|
||||
#HORIZON_CONFIG["password_autocomplete"] = "off"
|
||||
HORIZON_CONFIG["password_autocomplete"] = "<%= @password_autocomplete %>"
|
||||
|
||||
# Setting this to True will disable the reveal button for password fields,
|
||||
# including on the login form.
|
||||
|
Loading…
Reference in New Issue
Block a user