Skip to content

Commit 73f214c

Browse files
wesleylimaWesley Lima
and
Wesley Lima
authored
feat: OPTIC-1480: Adding env variable redirect on logout (#7086)
Co-authored-by: Wesley Lima <[email protected]>
1 parent cbf53fd commit 73f214c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

label_studio/core/settings/base.py

+2
Original file line numberDiff line numberDiff line change
@@ -809,3 +809,5 @@ def collect_versions_dummy(**kwargs):
809809
'ignore_name': '0002_auto_20210304_1457',
810810
'sql-analyser': 'postgresql',
811811
}
812+
813+
LOGOUT_REDIRECT_URL = get_env('LOGOUT_REDIRECT_URL', None)

label_studio/users/views.py

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
@login_required
2525
def logout(request):
2626
auth.logout(request)
27+
28+
if settings.LOGOUT_REDIRECT_URL:
29+
return redirect(settings.LOGOUT_REDIRECT_URL)
30+
2731
if settings.HOSTNAME:
2832
redirect_url = settings.HOSTNAME
2933
if not redirect_url.endswith('/'):

0 commit comments

Comments
 (0)