/admin/: fix login redirects to work with RemoteUserMiddleware; hide password changing functionality (which doesn't work with RemoteUser anyway)
- Legacy-Id: 2121
This commit is contained in:
parent
b8ca53052c
commit
549c4279d0
|
@ -204,12 +204,12 @@ class AdminSite(object):
|
|||
url(r'^logout/$',
|
||||
wrap(self.logout),
|
||||
name='logout'),
|
||||
url(r'^password_change/$',
|
||||
wrap(self.password_change, cacheable=True),
|
||||
name='password_change'),
|
||||
url(r'^password_change/done/$',
|
||||
wrap(self.password_change_done, cacheable=True),
|
||||
name='password_change_done'),
|
||||
#url(r'^password_change/$',
|
||||
# wrap(self.password_change, cacheable=True),
|
||||
# name='password_change'),
|
||||
#url(r'^password_change/done/$',
|
||||
# wrap(self.password_change_done, cacheable=True),
|
||||
# name='password_change_done'),
|
||||
url(r'^jsi18n/$',
|
||||
wrap(self.i18n_javascript, cacheable=True),
|
||||
name='jsi18n'),
|
||||
|
@ -277,6 +277,9 @@ class AdminSite(object):
|
|||
"""
|
||||
Displays the login form for the given HttpRequest.
|
||||
"""
|
||||
url = "/accounts/login/?next="+request.get_full_path()
|
||||
return http.HttpResponseRedirect(url)
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
# If this isn't already the login page, display it.
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
{% if docsroot %}
|
||||
<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> /
|
||||
{% endif %}
|
||||
{% comment %}
|
||||
{% url admin:password_change as password_change_url %}
|
||||
{% if password_change_url %}
|
||||
<a href="{{ password_change_url }}">
|
||||
|
@ -38,6 +39,7 @@
|
|||
<a href="{{ root_path }}password_change/">
|
||||
{% endif %}
|
||||
{% trans 'Change password' %}</a> /
|
||||
{% endcomment %}
|
||||
{% url admin:logout as logout_url %}
|
||||
{% if logout_url %}
|
||||
<a href="{{ logout_url }}">
|
||||
|
|
Loading…
Reference in a new issue