diff --git a/openstack_auth/views.py b/openstack_auth/views.py index 7ae3063e..9bdd5416 100644 --- a/openstack_auth/views.py +++ b/openstack_auth/views.py @@ -90,6 +90,10 @@ def login(request, template_name=None, extra_context=None, **kwargs): if extra_context is None: extra_context = {'redirect_field_name': auth.REDIRECT_FIELD_NAME} + 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'