mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	Don't try to remove SessionAuthenticationMiddleware
It was remove entirely in Django 2.0
This commit is contained in:
		@@ -79,8 +79,6 @@ INSTALLED_APPS = [
 | 
			
		||||
if os.getenv("PAPERLESS_INSTALLED_APPS"):
 | 
			
		||||
    INSTALLED_APPS += os.getenv("PAPERLESS_INSTALLED_APPS").split(",")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
MIDDLEWARE = [
 | 
			
		||||
    'django.middleware.security.SecurityMiddleware',
 | 
			
		||||
    'django.contrib.sessions.middleware.SessionMiddleware',
 | 
			
		||||
@@ -99,7 +97,6 @@ CORS_ORIGIN_WHITELIST = tuple(os.getenv("PAPERLESS_CORS_ALLOWED_HOSTS", "localho
 | 
			
		||||
if bool(os.getenv("PAPERLESS_DISABLE_LOGIN", "false").lower() in ("yes", "y", "1", "t", "true")):
 | 
			
		||||
    _index = MIDDLEWARE.index("django.contrib.auth.middleware.AuthenticationMiddleware")
 | 
			
		||||
    MIDDLEWARE[_index] = "paperless.middleware.Middleware"
 | 
			
		||||
    MIDDLEWARE.remove("django.contrib.auth.middleware.SessionAuthenticationMiddleware")
 | 
			
		||||
 | 
			
		||||
ROOT_URLCONF = 'paperless.urls'
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user