fix: capture and persist target object names for delete, outbound, and borrow operations in audit logs

This commit is contained in:
DXC
2026-03-20 15:47:13 +08:00
parent b08bbba718
commit 032479fe38
15 changed files with 54 additions and 21 deletions

View File

@ -227,8 +227,8 @@ def delete_user(user_id):
claims = get_jwt()
operator_role = claims.get('role')
AuthService.delete_user(user_id, operator_role)
return jsonify({'msg': '删除成功'}), 200
username = AuthService.delete_user(user_id, operator_role)
return jsonify({'msg': '删除成功', 'username': username}), 200
except Exception as e:
current_app.logger.error(f"Delete User Failed: {str(e)}")
return jsonify({'msg': str(e)}), 400