mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-10 16:46:50 +01:00
fixes #745
This commit is contained in:
parent
c74d261f6a
commit
0ad2b05455
1 changed files with 2 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
from django.conf import settings
|
||||
from django.contrib import auth
|
||||
from django.contrib.auth.models import User
|
||||
from django.utils.deprecation import MiddlewareMixin
|
||||
from rest_framework import authentication
|
||||
|
|
@ -11,6 +12,7 @@ class AutoLoginMiddleware(MiddlewareMixin):
|
|||
try:
|
||||
request.user = User.objects.get(
|
||||
username=settings.AUTO_LOGIN_USERNAME)
|
||||
auth.login(request, request.user)
|
||||
except User.DoesNotExist:
|
||||
pass
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue