mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-03 15:38:59 +00:00
Update authentication backend to be django 2 compatible
This commit is contained in:
@ -5,7 +5,7 @@ from django.contrib.auth.backends import ModelBackend
|
||||
# Special version of the authentication backend, so we can handle things like
|
||||
# forced lowercasing of usernames.
|
||||
class AuthBackend(ModelBackend):
|
||||
def authenticate(self, username=None, password=None):
|
||||
def authenticate(self, request, username=None, password=None):
|
||||
try:
|
||||
# We don't allow @ signs in usernames (see accounts/forms.py), so if there is one
|
||||
# specified then the user is clearly trying to log in with an email address,
|
||||
|
Reference in New Issue
Block a user