Show WEBSSO disclaimer only when it is needed
Horizon can support several auth mechanisms, i.e. Keystone creds and OpenID. User allowed to choose proper way of auth and disclaimer is shown. But it is possible to allow choose from the only variant, and in this case disclaimer also shown, which is confusing. Proposed patch fix disclaimer display and makes it reasonable Change-Id: I4bba535c5700179dcfa02dfe774c82bf7ec70824 Related-issue: PROD-20214
This commit is contained in:
parent
ddcfe7a6d4
commit
575cfa4917
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue