mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Fix: allow disable allauth email verification (#5895)
This commit is contained in:
		| @@ -572,6 +572,17 @@ system. See the corresponding | ||||
|  | ||||
|     Defaults 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. | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 shamoon
					shamoon