diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2006-09-29 13:37:58 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2006-09-29 13:37:58 +0000 |
| commit | 14fb13da7ef3137a6b166c77724c3d790795e212 (patch) | |
| tree | 1ddb8f3f60bfb29a08f090c694b8b817b6369a2f /django | |
| parent | fa8a1d252a4e928e5bed2cf7002e38943d80f753 (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.py | 2 |
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() |
