Airflow: Get user logged in with ldap

1.9k views Asked by At

Does anyone know how I'll be able to get the current user from airflow? We have our backend enabled to airflow/contrib/auth/backends/ldap_auth.pyand so users log in via that authentication and I want to know how to get the current user that clicks on something (a custom view we have as a plugin).

1

There are 1 answers

1
Ace Haidrey On BEST ANSWER

You can get it by calling {{ current_user.user.username }} or {{ current_user.user }} in your html jenja template.