diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-07-26 22:48:04 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-07-26 22:48:04 +0000 |
| commit | fe91881e35db30dc61185c38cc0ab5c6a642e82f (patch) | |
| tree | 9a96d3982f7a7228d5739d04e675837cf7d6aba6 /django/middleware | |
| parent | 3c0c0e7317ebc5bb43faf8cdf24ca495ff154e91 (diff) | |
Fixed #159 -- Admin users no longer have to log in to go to the 'log out' page. Thanks, Manuzhai
git-svn-id: http://code.djangoproject.com/svn/django/trunk@325 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/middleware')
| -rw-r--r-- | django/middleware/admin.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/django/middleware/admin.py b/django/middleware/admin.py index 4ae741de82..a977bacdbf 100644 --- a/django/middleware/admin.py +++ b/django/middleware/admin.py @@ -3,6 +3,7 @@ from django.core import template_loader from django.core.extensions import DjangoContext as Context from django.models.auth import sessions, users from django.views.registration import passwords +from django.views.auth.login import logout import base64, md5 import cPickle as pickle from django.conf.settings import SECRET_KEY @@ -26,8 +27,9 @@ class AdminUserRequired: # If this is the password reset view, we don't want to require login # Otherwise the password reset would need its own entry in the httpd - # conf, which is a little uglier than this. - if view_func == passwords.password_reset or view_func == passwords.password_reset_done: + # conf, which is a little uglier than this. Same goes for the logout + # view. + if view_func in (passwords.password_reset, passwords.password_reset_done, logout): return # Check for a logged in, valid user |
