mirror of https://github.com/zulip/zulip.git
Show a SSO login page for SSO users that just has a login button
(imported from commit 0004bf8710491f4e2d967b4367b37d57833845ee)
This commit is contained in:
parent
be3257de62
commit
5fd97e48c3
|
@ -864,7 +864,7 @@ a.bottom-signup-button {
|
|||
font-weight: 300;
|
||||
}
|
||||
|
||||
.login-google, .register-google {
|
||||
.login-google, .register-google, .login-sso {
|
||||
width: 300px;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
|
|
|
@ -25,6 +25,16 @@ autofocus('#id_username');
|
|||
|
||||
<h3 class="login-page-header">You look familiar.</h3>
|
||||
|
||||
{% if only_sso %}
|
||||
{% comment %}SSO users don't have a password.{% endcomment %}
|
||||
|
||||
<div class="login-sso">
|
||||
<a href="/accounts/login/sso" class="btn btn-large btn-primary">Sign in with SSO</a>
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
{% comment %}Non-SSO users.{% endcomment %}
|
||||
|
||||
{% if form.errors or sso_unknown_email %}
|
||||
<div class="alert alert-error">
|
||||
{% if sso_unknown_email %}
|
||||
|
@ -86,6 +96,8 @@ autofocus('#id_username');
|
|||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div class="footer-padder"></div>
|
||||
</div>
|
||||
|
|
|
@ -14,6 +14,7 @@ def add_settings(request):
|
|||
'zulip_admin': settings.ZULIP_ADMINISTRATOR,
|
||||
'password_auth_enabled': password_auth_enabled(),
|
||||
'login_url': settings.HOME_NOT_LOGGED_IN,
|
||||
'only_sso': settings.ONLY_SSO,
|
||||
}
|
||||
|
||||
def add_metrics(request):
|
||||
|
|
Loading…
Reference in New Issue