Ticket #2550: auth-__init__-changed-viewable.diff
File auth-__init__-changed-viewable.diff, 917 bytes (added by , 18 years ago) |
---|
-
trunk/django/contrib/auth/__init__.py
1 from django.core.exceptions import ImproperlyConfigured 1 from django.core.exceptions import ImproperlyConfigured, PermissionDenied 2 2 3 3 SESSION_KEY = '_auth_user_id' 4 4 BACKEND_SESSION_KEY = '_auth_user_backend' … … 35 35 except TypeError: 36 36 # This backend doesn't accept these credentials as arguments. Try the next one. 37 37 continue 38 except PermissionDenied: 39 # This backend says to stop in our tracks - this user should not be allowed in at all. 40 return None 38 41 if user is None: 39 42 continue 40 43 # Annotate the user object with the path of the backend.