From 2eb3c4d515499a0c09d36824161c736a9a2cca25 Mon Sep 17 00:00:00 2001 From: Arjun Anandkumar Date: Sun, 19 Mar 2023 14:34:41 +0100 Subject: [PATCH 1/3] Add fullname to owner on logging --- airflow/www/decorators.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airflow/www/decorators.py b/airflow/www/decorators.py index 29094969f7da2..7a3fc2f27c00e 100644 --- a/airflow/www/decorators.py +++ b/airflow/www/decorators.py @@ -87,7 +87,8 @@ def wrapper(*args, **kwargs): if g.user.is_anonymous: user = "anonymous" else: - user = g.user.username + full_name = f"{g.user.first_name} {g.user.last_name}" + user = g.user.username + f" ({full_name})" fields_skip_logging = {"csrf_token", "_csrf_token"} extra_fields = [ From 18426f738b455bca137fc56f73ca71ac8b03ab81 Mon Sep 17 00:00:00 2001 From: Malthe Borch Date: Mon, 20 Mar 2023 09:04:40 +0000 Subject: [PATCH 2/3] Use existing method to format full name --- airflow/www/decorators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow/www/decorators.py b/airflow/www/decorators.py index 7a3fc2f27c00e..3f66614c2ad9c 100644 --- a/airflow/www/decorators.py +++ b/airflow/www/decorators.py @@ -87,7 +87,7 @@ def wrapper(*args, **kwargs): if g.user.is_anonymous: user = "anonymous" else: - full_name = f"{g.user.first_name} {g.user.last_name}" + full_name = g.user.get_full_name() user = g.user.username + f" ({full_name})" fields_skip_logging = {"csrf_token", "_csrf_token"} From e8aaa990194f5e63ed692f1e0f0753c9d56be342 Mon Sep 17 00:00:00 2001 From: Arjun Anandkumar <102953522+arjunanan6@users.noreply.github.com> Date: Tue, 9 May 2023 17:18:46 +0200 Subject: [PATCH 3/3] Update airflow/www/decorators.py Co-authored-by: Tzu-ping Chung --- airflow/www/decorators.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/airflow/www/decorators.py b/airflow/www/decorators.py index 3f66614c2ad9c..4afb15e534133 100644 --- a/airflow/www/decorators.py +++ b/airflow/www/decorators.py @@ -87,8 +87,7 @@ def wrapper(*args, **kwargs): if g.user.is_anonymous: user = "anonymous" else: - full_name = g.user.get_full_name() - user = g.user.username + f" ({full_name})" + user = f"{g.user.username} ({g.user.get_full_name()})" fields_skip_logging = {"csrf_token", "_csrf_token"} extra_fields = [