mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Specify backend for auto-login
This commit is contained in:
parent
405769dc97
commit
8a505e3b66
@ -10,7 +10,11 @@ class AutoLoginMiddleware(MiddlewareMixin):
|
||||
def process_request(self, request):
|
||||
try:
|
||||
request.user = User.objects.get(username=settings.AUTO_LOGIN_USERNAME)
|
||||
auth.login(request, request.user)
|
||||
auth.login(
|
||||
request=request,
|
||||
user=request.user,
|
||||
backend="django.contrib.auth.backends.ModelBackend",
|
||||
)
|
||||
except User.DoesNotExist:
|
||||
pass
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user