From 7b9f46c608c9f900f346026257c105b9c3c9ca5f Mon Sep 17 00:00:00 2001 From: rolinchen Date: Thu, 7 Nov 2024 20:50:05 +0800 Subject: [PATCH] feat: added operation audit for personal center and tenant --- src/bk-user/bkuser/apis/web/personal_center/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bk-user/bkuser/apis/web/personal_center/views.py b/src/bk-user/bkuser/apis/web/personal_center/views.py index f3954b697..8f482903f 100644 --- a/src/bk-user/bkuser/apis/web/personal_center/views.py +++ b/src/bk-user/bkuser/apis/web/personal_center/views.py @@ -218,6 +218,7 @@ def put(self, request, *args, **kwargs): operation=OperationEnum.MODIFY_USER_PHONE, object_type=ObjectTypeEnum.USER, object_id=tenant_user.id, + # 记录 name 方便前端展示 extras={"data_before": data_before, "name": tenant_user.data_source_user.username}, ) @@ -332,6 +333,7 @@ def put(self, request, *args, **kwargs): operation=OperationEnum.MODIFY_USER_EMAIL, object_type=ObjectTypeEnum.USER, object_id=tenant_user.id, + # 记录 name 方便前端展示 extras={"data_before": data_before, "name": tenant_user.data_source_user.username}, ) @@ -579,6 +581,7 @@ def put(self, request, *args, **kwargs): operation=OperationEnum.MODIFY_USER_PASSWORD, object_type=ObjectTypeEnum.USER, object_id=tenant_user.id, + # 记录 name 方便前端展示 extras={"name": tenant_user.data_source_user.username}, )