mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #25187 -- Made request available in authentication backends.
This commit is contained in:
committed by
Tim Graham
parent
32c0d823e5
commit
4b9330ccc0
@@ -475,7 +475,7 @@ class PermissionDeniedBackend(object):
|
||||
Always raises PermissionDenied in `authenticate`, `has_perm` and `has_module_perms`.
|
||||
"""
|
||||
|
||||
def authenticate(self, username=None, password=None):
|
||||
def authenticate(self, request, username=None, password=None):
|
||||
raise PermissionDenied
|
||||
|
||||
def has_perm(self, user_obj, perm, obj=None):
|
||||
@@ -585,7 +585,7 @@ class TypeErrorBackend(object):
|
||||
Always raises TypeError.
|
||||
"""
|
||||
|
||||
def authenticate(self, username=None, password=None):
|
||||
def authenticate(self, request, username=None, password=None):
|
||||
raise TypeError
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user