Skip to content

Commit

Permalink
Fixed Issue #45116
Browse files Browse the repository at this point in the history
  • Loading branch information
Spaarsh committed Dec 27, 2024
1 parent 7f2b8ef commit cb750c2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions airflow/www/templates/appbuilder/navbar_menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,11 @@
{% endif %}
{% endif %}
{% endfor %}
{% if auth_manager.is_logged_in() %}
<li>
<a href="javascript:{}" onclick="document.getElementById('logout-form').submit();" data-original-title="" title="">Logout</a>
</form>
</li>
<form method="POST" action="{{ auth_manager.get_url_logout() }}" id="logout-form">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
{% endif %}
2 changes: 1 addition & 1 deletion airflow/www/templates/appbuilder/navbar_right.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@
</li>
{% else %}
<li>
<a href="{{auth_manager.get_url_login()}}"><span class="material-icons">login</span>{{_("Log In")}}</a>
<a href="{{auth_manager.get_url_login()}}"><span class="material-icons"></span>{{_("Log In")}}</a>
</li>
{% endif %}
2 changes: 2 additions & 0 deletions airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit cb750c2

Please sign in to comment.