This is an automated email from the ASF dual-hosted git repository.
shahar pushed a commit to branch v2-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v2-10-test by this push:
new f707836deb logout link in no roles error page fix (#41813) (#41845)
f707836deb is described below
commit f707836deba8c286f70142c387927f25bd5938d7
Author: Shahar Epstein <[email protected]>
AuthorDate: Thu Aug 29 07:50:34 2024 +0300
logout link in no roles error page fix (#41813) (#41845)
* logout link in no roles error page fix
* review comments
(cherry picked from commit 032ac87b1d93abc53d3281313c957708017e21d4)
Co-authored-by: Gagan Bhullar <[email protected]>
---
airflow/www/templates/airflow/no_roles_permissions.html | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/airflow/www/templates/airflow/no_roles_permissions.html
b/airflow/www/templates/airflow/no_roles_permissions.html
index eaa54c06a2..fa619c403c 100644
--- a/airflow/www/templates/airflow/no_roles_permissions.html
+++ b/airflow/www/templates/airflow/no_roles_permissions.html
@@ -30,7 +30,12 @@
<p>Unfortunately your user has no roles, and therefore you cannot use
Airflow.</p>
<p>Please contact your Airflow administrator
(<a
href="https://airflow.apache.org/docs/apache-airflow/stable/security/webserver.html#web-authentication">authentication</a>
- may be misconfigured) or <a href="{{ logout_url }}">log out</a> to try
again.</p>
+ may be misconfigured) or
+ <form method="POST" action="{{logout_url}}" id="logout-form">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
+ <a href="javascript:{}"
onclick="document.getElementById('logout-form').submit();">log out</a> to try
again.
+ </form>
+ </p>
<p>{{ hostname }}</p>
</div>
</body>