Skip to content

Commit

Permalink
feat: added operation audit for department and virtual user
Browse files Browse the repository at this point in the history
  • Loading branch information
rolin999 committed Nov 7, 2024
1 parent 7a3224d commit c18cd2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bk-user/bkuser/apis/web/organization/views/departments.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ def delete(self, request, *args, **kwargs):
operation=OperationEnum.DELETE_DEPARTMENT,
object_type=ObjectTypeEnum.DEPARTMENT,
object_id=tenant_dept.id,
# 记录 name 方便前端展示
extras={"name": data_source_dept.name, "sub_dept_ids": list(sub_dept_ids)},
)

Expand Down Expand Up @@ -523,6 +524,7 @@ def put(self, request, *args, **kwargs):
operation=OperationEnum.MODIFY_PARENT_DEPARTMENT,
object_type=ObjectTypeEnum.DEPARTMENT,
object_id=tenant_dept.id,
# 记录 name 方便前端展示
extras={"name": data_source_dept.name, "data_before": data_before},
)

Expand Down
1 change: 1 addition & 0 deletions src/bk-user/bkuser/apis/web/virtual_user/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ def put(self, request, *args, **kwargs):
operation=OperationEnum.MODIFY_VIRTUAL_USER,
object_type=ObjectTypeEnum.VIRTUAL_USER,
object_id=tenant_user.id,
# 记录 name 方便前端展示
extras={"data_before": data_before, "name": name},
)

Expand Down

0 comments on commit c18cd2a

Please sign in to comment.