From 55583604de688c66a32ae14526615fdb594abd99 Mon Sep 17 00:00:00 2001 From: culbert Date: Tue, 13 Jul 2021 09:41:11 -0400 Subject: [PATCH] allow logout redirect URL to be configured --- coldfront/config/auth.py | 4 ++-- coldfront/core/user/urls.py | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/coldfront/config/auth.py b/coldfront/config/auth.py index 6439ed845..56b6506f6 100644 --- a/coldfront/config/auth.py +++ b/coldfront/config/auth.py @@ -10,14 +10,14 @@ LOGIN_URL = '/user/login' LOGIN_REDIRECT_URL = '/' -LOGOUT_REDIRECT_URL = '/' +LOGOUT_REDIRECT_URL = ENV.str('LOGOUT_REDIRECT_URL', LOGIN_URL) SU_LOGIN_CALLBACK = "coldfront.core.utils.common.su_login_callback" SU_LOGOUT_REDIRECT_URL = "/admin/auth/user/" SESSION_COOKIE_AGE = 60 * 15 SESSION_SAVE_EVERY_REQUEST = True -SESSION_COOKIE_SAMESITE = 'Strict' +SESSION_COOKIE_SAMESITE = 'Strict' SESSION_COOKIE_SECURE = True #------------------------------------------------------------------------------ diff --git a/coldfront/core/user/urls.py b/coldfront/core/user/urls.py index 9d5b85f6b..b5b3fd0cf 100644 --- a/coldfront/core/user/urls.py +++ b/coldfront/core/user/urls.py @@ -15,10 +15,7 @@ redirect_authenticated_user=True), name='login' ), - path('logout', - LogoutView.as_view(next_page=reverse_lazy('login')), - name='logout' - ), + path('logout', LogoutView.as_view(), name='logout'), path('user-profile/', user_views.UserProfile.as_view(), name='user-profile'), path('user-profile/', user_views.UserProfile.as_view(), name='user-profile'), path('user-projects-managers/', user_views.UserProjectsManagersView.as_view(), name='user-projects-managers'),