diff --git a/horizon/templates/auth/_login_form.html b/horizon/templates/auth/_login_form.html index f3392f09d7..66ce8ff194 100644 --- a/horizon/templates/auth/_login_form.html +++ b/horizon/templates/auth/_login_form.html @@ -30,7 +30,9 @@ {%endif%} + {% if show_sso_opts %} {% include "auth/_description.html" %} + {% endif %}
{% if request.user.is_authenticated and 'next' in request.GET %}
diff --git a/openstack_auth/views.py b/openstack_auth/views.py index 57c0ae8d43..7f6536f70a 100644 --- a/openstack_auth/views.py +++ b/openstack_auth/views.py @@ -92,6 +92,10 @@ def login(request, template_name=None, extra_context=None, **kwargs): extra_context['csrf_failure'] = request.GET.get('csrf_failure') + choices = getattr(settings, 'WEBSSO_CHOICES', ()) + extra_context['show_sso_opts'] = (utils.is_websso_enabled() and + len(choices) > 1) + if not template_name: if request.is_ajax(): template_name = 'auth/_login.html'