This is an automated email from the ASF dual-hosted git repository.

shahar pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 032ac87b1d logout link in no roles error page fix (#41813)
032ac87b1d is described below

commit 032ac87b1d93abc53d3281313c957708017e21d4
Author: Gagan Bhullar <[email protected]>
AuthorDate: Wed Aug 28 12:16:19 2024 -0600

    logout link in no roles error page fix (#41813)
    
    * logout link in no roles error page fix
    
    * review comments
---
 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>

Reply via email to