From cb750c2220ba7bd4c6d0f7c0386a4511cd8599da Mon Sep 17 00:00:00 2001 From: Spaarsh-root Date: Sat, 28 Dec 2024 00:58:24 +0530 Subject: [PATCH] Fixed Issue #45116 --- airflow/www/templates/appbuilder/navbar_menu.html | 8 ++++++++ airflow/www/templates/appbuilder/navbar_right.html | 2 +- airflow/www/views.py | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/airflow/www/templates/appbuilder/navbar_menu.html b/airflow/www/templates/appbuilder/navbar_menu.html index db2de352d3141..8fd4bf397a358 100644 --- a/airflow/www/templates/appbuilder/navbar_menu.html +++ b/airflow/www/templates/appbuilder/navbar_menu.html @@ -58,3 +58,11 @@ {% endif %} {% endif %} {% endfor %} +{% if auth_manager.is_logged_in() %} +
  • + Logout + +
  • +
    + +{% endif %} \ No newline at end of file diff --git a/airflow/www/templates/appbuilder/navbar_right.html b/airflow/www/templates/appbuilder/navbar_right.html index fb82a15191511..61b799c0418c9 100644 --- a/airflow/www/templates/appbuilder/navbar_right.html +++ b/airflow/www/templates/appbuilder/navbar_right.html @@ -93,6 +93,6 @@ {% else %}
  • - login{{_("Log In")}} + {{_("Log In")}}
  • {% endif %} diff --git a/airflow/www/views.py b/airflow/www/views.py index 01b10b98aff64..b2e1b4272e697 100644 --- a/airflow/www/views.py +++ b/airflow/www/views.py @@ -1136,6 +1136,8 @@ def _iter_parsed_moved_data_table_names(): auto_refresh_interval=conf.getint("webserver", "auto_refresh_interval"), asset_triggered_next_run_info=asset_triggered_next_run_info, file_tokens=file_tokens, + logout_url=get_auth_manager().get_url_logout(), + is_logged_in=get_auth_manager().is_logged_in() ) @expose("/assets")