summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2006-09-29 13:37:58 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2006-09-29 13:37:58 +0000
commit14fb13da7ef3137a6b166c77724c3d790795e212 (patch)
tree1ddb8f3f60bfb29a08f090c694b8b817b6369a2f /django
parentfa8a1d252a4e928e5bed2cf7002e38943d80f753 (diff)
Disabled access to the admin site for inactive accounts, and clarified documentation regarding User.is_active. Thanks to Enrico <rico.bl@gmail.com> for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3884 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/contrib/admin/views/decorators.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/admin/views/decorators.py b/django/contrib/admin/views/decorators.py
index fce50909f0..9dfe651fe6 100644
--- a/django/contrib/admin/views/decorators.py
+++ b/django/contrib/admin/views/decorators.py
@@ -87,7 +87,7 @@ def staff_member_required(view_func):
# The user data is correct; log in the user in and continue.
else:
- if user.is_staff:
+ if user.is_active and user.is_staff:
login(request, user)
# TODO: set last_login with an event.
user.last_login = datetime.datetime.now()