mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #25232 -- Made ModelBackend/RemoteUserBackend reject inactive users.
This commit is contained in:
committed by
Tim Graham
parent
1555d50ea4
commit
e0a3d93730
@@ -97,6 +97,15 @@ class RemoveGroupsAndPermissions(object):
|
||||
PermissionsMixin._meta.local_many_to_many = self._old_pm_local_m2m
|
||||
|
||||
|
||||
class CustomUserWithoutIsActiveField(AbstractBaseUser):
|
||||
username = models.CharField(max_length=150, unique=True)
|
||||
email = models.EmailField(unique=True)
|
||||
|
||||
objects = UserManager()
|
||||
|
||||
USERNAME_FIELD = 'username'
|
||||
|
||||
|
||||
# The extension user is a simple extension of the built-in user class,
|
||||
# adding a required date_of_birth field. This allows us to check for
|
||||
# any hard references to the name "User" in forms/handlers etc.
|
||||
|
||||
Reference in New Issue
Block a user