From ec6e07887b46b69ed37bd5d82797bf607a7d88bb Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 1 Oct 2023 09:48:03 -0700 Subject: [PATCH] Merge context processors --- src/documents/context_processors.py | 5 +++++ src/documents/templates/registration/login.html | 6 +++--- src/paperless/context_processors.py | 5 ----- src/paperless/settings.py | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 src/paperless/context_processors.py diff --git a/src/documents/context_processors.py b/src/documents/context_processors.py index 90c856aeb..6e14707bb 100644 --- a/src/documents/context_processors.py +++ b/src/documents/context_processors.py @@ -5,4 +5,9 @@ def settings(request): return { "EMAIL_ENABLED": django_settings.EMAIL_HOST != "localhost" or django_settings.EMAIL_HOST_USER != "", + "DISABLE_NORMAL_AUTH": django_settings.SOCIAL_AUTH_DISABLE_NORMAL_AUTH, + "OIDC_ENABLE": django_settings.SOCIAL_AUTH_OIDC_ENABLE, + "OIDC_NAME": django_settings.SOCIAL_AUTH_OIDC_NAME + if django_settings.SOCIAL_AUTH_OIDC_ENABLE + else None, } diff --git a/src/documents/templates/registration/login.html b/src/documents/templates/registration/login.html index 73e80fcf8..97e5f3238 100644 --- a/src/documents/templates/registration/login.html +++ b/src/documents/templates/registration/login.html @@ -52,7 +52,7 @@ {% translate "Share link has expired." %} {% endif %} - {% if not SOCIAL_AUTH_DISABLE_NORMAL_AUTH %} + {% if not DISABLE_NORMAL_AUTH %} {% translate "Username" as i18n_username %} {% translate "Password" as i18n_password %}