A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Rejiggering code style to make upstream pycodestyle checks happy
Matt96c517d65c4a
diff --git a/src/paperless/auto_auth.py b/src/paperless/auto_auth.pyindex f4b908c7d..a12bf9405 100644--- a/src/paperless/auto_auth.py+++ b/src/paperless/auto_auth.py@@ -1,24 +1,34 @@from django.contrib.auth.models import User'''- This is a dummy authentication middleware module that creates what+ This is a dummy authentication middleware module that creates whatis roughly an Anonymous authenticated user so we can disable loginand not interfere with existing user ID's.'''+class User:is_superuser = Trueis_active = Trueis_staff = True- is_authenticated=True- id = -1 #Must be -1 to avoid colliding with possible existing user ID's (that start number at 1)+ is_authenticated = True++ '''+ Must be -1 to avoid colliding with possible+ existing user ID's (that start number at 1)+ '''+ id = -1pk = -1+def return_true(*args, **kwargs):return True++User.has_module_perms = return_trueUser.has_perm = return_true+class Middleware(object):def process_request(self, request):request.user = User()