From ca792e564fee8a78bfba7fd0411bb0999ccb3217 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 23 Feb 2022 18:01:52 +0900 Subject: [PATCH] Put each WEBSSO_* option just after descriptions ... so that users can more easily understand how these parameters are used. Change-Id: I174651831b48c14b43fbd3fb869c5854b14488ff --- templates/local_settings.py.erb | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/templates/local_settings.py.erb b/templates/local_settings.py.erb index 71613793..267cc2bb 100644 --- a/templates/local_settings.py.erb +++ b/templates/local_settings.py.erb @@ -305,9 +305,15 @@ OPENSTACK_KEYSTONE_DEFAULT_ROLE = "<%= @keystone_default_role %>" # Enables keystone web single-sign-on if set to True. #WEBSSO_ENABLED = False +<% if @websso_enabled -%> +WEBSSO_ENABLED = True +<% end -%> # Determines which authentication choice to show as default. #WEBSSO_INITIAL_CHOICE = "credentials" +<% if @websso_initial_choice -%> +WEBSSO_INITIAL_CHOICE = "<%= @websso_initial_choice %>" +<% end -%> # The list of authentication mechanisms which include keystone # federation protocols and identity provider/federation protocol @@ -324,6 +330,14 @@ OPENSTACK_KEYSTONE_DEFAULT_ROLE = "<%= @keystone_default_role %>" # ("acme_oidc", "ACME - OpenID Connect"), # ("acme_saml2", "ACME - SAML2") #) +<% if @websso_choices.kind_of?(Array) -%> +WEBSSO_CHOICES = ( + ("credentials", _("Keystone Credentials")), +<% @websso_choices.each do |r| -%> + ("<%= r[0] -%>", _("<%= r[1] -%>")), +<% end -%> +) +<% end -%> # A dictionary of specific identity provider and federation protocol # combinations. From the selected authentication mechanism, the value @@ -336,20 +350,6 @@ OPENSTACK_KEYSTONE_DEFAULT_ROLE = "<%= @keystone_default_role %>" # "acme_oidc": ("acme", "oidc"), # "acme_saml2": ("acme", "saml2") #} -<% if @websso_enabled -%> -WEBSSO_ENABLED = True -<% end -%> -<% if @websso_initial_choice -%> -WEBSSO_INITIAL_CHOICE = "<%= @websso_initial_choice %>" -<% end -%> -<% if @websso_choices.kind_of?(Array) -%> -WEBSSO_CHOICES = ( - ("credentials", _("Keystone Credentials")), -<% @websso_choices.each do |r| -%> - ("<%= r[0] -%>", _("<%= r[1] -%>")), -<% end -%> -) -<% end -%> <% if @websso_idp_mapping.kind_of?(Hash) -%> WEBSSO_IDP_MAPPING = { <% @websso_idp_mapping.each do |key,r| -%>