mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-07-25 15:03:31 +00:00
feat: replace login middleware (#1314)
This commit is contained in:
@ -545,13 +545,5 @@ except ImportError:
|
|||||||
|
|
||||||
|
|
||||||
if GLOBAL_LOGIN_REQUIRED:
|
if GLOBAL_LOGIN_REQUIRED:
|
||||||
# this should go after the AuthenticationMiddleware middleware
|
auth_index = MIDDLEWARE.index("django.contrib.auth.middleware.AuthenticationMiddleware")
|
||||||
MIDDLEWARE.insert(6, "login_required.middleware.LoginRequiredMiddleware")
|
MIDDLEWARE.insert(auth_index + 1, "django.contrib.auth.middleware.LoginRequiredMiddleware")
|
||||||
LOGIN_REQUIRED_IGNORE_PATHS = [
|
|
||||||
r'/accounts/login/$',
|
|
||||||
r'/accounts/logout/$',
|
|
||||||
r'/accounts/signup/$',
|
|
||||||
r'/accounts/password/.*/$',
|
|
||||||
r'/accounts/confirm-email/.*/$',
|
|
||||||
# r'/api/v[0-9]+/',
|
|
||||||
]
|
|
||||||
|
@ -18,7 +18,6 @@ requests==2.32.3
|
|||||||
django-celery-email==3.0.0
|
django-celery-email==3.0.0
|
||||||
m3u8==6.0.0
|
m3u8==6.0.0
|
||||||
django-debug-toolbar==5.0.1
|
django-debug-toolbar==5.0.1
|
||||||
django-login-required-middleware==0.9.0
|
|
||||||
pre-commit==4.1.0
|
pre-commit==4.1.0
|
||||||
django-jazzmin==3.0.1
|
django-jazzmin==3.0.1
|
||||||
pysubs2==1.8.0
|
pysubs2==1.8.0
|
||||||
|
Reference in New Issue
Block a user