1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #24987 -- Allowed inactive users to login with the test client.

This commit is contained in:
Alexander Gaevsky
2016-02-05 21:03:06 +02:00
committed by Tim Graham
parent e0a3d93730
commit 107165c4b0
4 changed files with 18 additions and 12 deletions

View File

@@ -599,8 +599,7 @@ class Client(RequestFactory):
"""
from django.contrib.auth import authenticate
user = authenticate(**credentials)
if (user and user.is_active and
apps.is_installed('django.contrib.sessions')):
if user and apps.is_installed('django.contrib.sessions'):
self._login(user)
return True
else: