mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-30 13:23:14 +00:00
Merge branch '11.0'
This commit is contained in:
commit
fc9fe44055
8
seahub/templates/client_login_complete.html
Normal file
8
seahub/templates/client_login_complete.html
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block main_content %}
|
||||||
|
<div class="text-panel">
|
||||||
|
<p>{% trans "The client has logged in. Please open the client to confirm." %}</p>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{% block main_content %}
|
{% block main_content %}
|
||||||
<div class="new-narrow-panel">
|
<div class="new-narrow-panel">
|
||||||
<h2 class="hd">{% trans "Desktop Client Login Confirm" %}</h2>
|
<h2 class="hd">{% trans "Client Login Confirm" %}</h2>
|
||||||
<form action="" method="post" class="con">{% csrf_token %}
|
<form action="" method="post" class="con">{% csrf_token %}
|
||||||
<label>{% trans "Do you want to login to your client?" %}</label><br />
|
<label>{% trans "Do you want to login to your client?" %}</label><br />
|
||||||
<input type="submit" value="{% trans "Yes" %}" class="submit" />
|
<input type="submit" value="{% trans "Yes" %}" class="submit" />
|
||||||
|
@ -232,6 +232,7 @@ def client_sso_complete(request, token):
|
|||||||
else:
|
else:
|
||||||
logger.warning('Client SSO token is not waiting, skip.')
|
logger.warning('Client SSO token is not waiting, skip.')
|
||||||
|
|
||||||
return HttpResponseRedirect(reverse('libraries'))
|
template_name = 'client_login_complete.html'
|
||||||
|
return render(request, template_name, {})
|
||||||
else:
|
else:
|
||||||
return render_permission_error(request, _('Permission denied.'))
|
return render_permission_error(request, _('Permission denied.'))
|
||||||
|
@ -39,7 +39,7 @@ class SSOTest(BaseTestCase):
|
|||||||
|
|
||||||
t.accessed()
|
t.accessed()
|
||||||
resp = self.client.post('/client-sso/%s/complete/' % t.token)
|
resp = self.client.post('/client-sso/%s/complete/' % t.token)
|
||||||
self.assertEqual(resp.status_code, 302)
|
self.assertEqual(resp.status_code, 200)
|
||||||
|
|
||||||
t2 = ClientSSOToken.objects.get(token=t.token)
|
t2 = ClientSSOToken.objects.get(token=t.token)
|
||||||
assert t2.api_key is not None
|
assert t2.api_key is not None
|
||||||
|
Loading…
Reference in New Issue
Block a user