2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

turn off normal allauth urls if CUI is not active

This commit is contained in:
Matthias Mair
2024-06-25 20:38:38 +02:00
parent 8b1f871b75
commit daacfaf580
2 changed files with 7 additions and 1 deletions

View File

@ -1184,6 +1184,7 @@ HEADLESS_FRONTEND_URLS = {
'account_reset_password_from_key': 'https://app.org/account/password/reset/key/{key}',
'account_signup': 'https://app.org/account/signup',
}
HEADLESS_ONLY = not ENABLE_CLASSIC_FRONTEND
# Markdownify configuration
# Ref: https://django-markdownify.readthedocs.io/en/latest/settings.html

View File

@ -370,7 +370,6 @@ classic_frontendpatterns = [
),
# Override login page
path('accounts/login/', CustomLoginView.as_view(), name='account_login'),
path('accounts/', include('allauth.urls')), # included urlpatterns
]
urlpatterns = []
@ -392,6 +391,12 @@ frontendpatterns = []
if settings.ENABLE_CLASSIC_FRONTEND:
frontendpatterns += classic_frontendpatterns
# Add auth
frontendpatterns += [
path('accounts/', include('allauth.urls')) # Always needed as we need providers
]
if settings.ENABLE_PLATFORM_FRONTEND:
frontendpatterns += platform_urls
if not settings.ENABLE_CLASSIC_FRONTEND: