Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit fe91881e35db30dc61185c38cc0ab5c6a642e82f 1 parent 3c0c0e7
Adrian Holovaty authored July 26, 2005

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  django/middleware/admin.py
6  django/middleware/admin.py
@@ -3,6 +3,7 @@
3 3
 from django.core.extensions import DjangoContext as Context
4 4
 from django.models.auth import sessions, users
5 5
 from django.views.registration import passwords
  6
+from django.views.auth.login import logout
6 7
 import base64, md5
7 8
 import cPickle as pickle
8 9
 from django.conf.settings import SECRET_KEY
@@ -26,8 +27,9 @@ def process_view(self, request, view_func, param_dict):
26 27
 
27 28
         # If this is the password reset view, we don't want to require login
28 29
         # Otherwise the password reset would need its own entry in the httpd
29  
-        # conf, which is a little uglier than this.
30  
-        if view_func == passwords.password_reset or view_func == passwords.password_reset_done:
  30
+        # conf, which is a little uglier than this. Same goes for the logout
  31
+        # view.
  32
+        if view_func in (passwords.password_reset, passwords.password_reset_done, logout):
31 33
             return
32 34
 
33 35
         # Check for a logged in, valid user

0 notes on commit fe91881

Please sign in to comment.
Something went wrong with that request. Please try again.