A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Fix: allow disable allauth email verification (#5895)
shamoon3e2c541b7bd3
diff --git a/docs/configuration.md b/docs/configuration.mdindex 43eff582b..36a1bb1c9 100644--- a/docs/configuration.md+++ b/docs/configuration.md@@ -572,6 +572,17 @@ system. See the correspondingDefaults to 'https'+#### [`PAPERLESS_ACCOUNT_EMAIL_VERIFICATION=<string>`](#PAPERLESS_ACCOUNT_EMAIL_VERIFICATION) {#PAPERLESS_ACCOUNT_EMAIL_VERIFICATION}++: Determines whether email addresses are verified during signup (as performed by Django allauth). See the relevant+[paperless settings](#PAPERLESS_EMAIL_HOST) and [the allauth docs](https://docs.allauth.org/en/latest/account/configuration.html)++ Defaults to 'optional'++!!! note++ If you do not have a working email server set up you should set this to 'none'.+#### [`PAPERLESS_DISABLE_REGULAR_LOGIN=<bool>`](#PAPERLESS_DISABLE_REGULAR_LOGIN) {#PAPERLESS_DISABLE_REGULAR_LOGIN}: Disables the regular frontend username / password login, i.e. once you have setup SSO. Note that the Django admin login cannot be disabled.diff --git a/src/paperless/settings.py b/src/paperless/settings.pyindex 5f25b3512..24b3ae32f 100644--- a/src/paperless/settings.py+++ b/src/paperless/settings.py@@ -441,6 +441,11 @@ DISABLE_REGULAR_LOGIN = __get_boolean("PAPERLESS_DISABLE_REGULAR_LOGIN")AUTO_LOGIN_USERNAME = os.getenv("PAPERLESS_AUTO_LOGIN_USERNAME")+ACCOUNT_EMAIL_VERIFICATION = os.getenv(+ "PAPERLESS_ACCOUNT_EMAIL_VERIFICATION",+ "optional",+)+if AUTO_LOGIN_USERNAME:_index = MIDDLEWARE.index("django.contrib.auth.middleware.AuthenticationMiddleware")# This overrides everything the auth middleware is doing but still allows