RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Update for audit (#21754)
Jin Hai6f571fda64cb
diff --git a/internal/common/model.go b/internal/common/model.goindex 8d9408db91..7cf4f7d627 100644--- a/internal/common/model.go+++ b/internal/common/model.go@@ -54,6 +54,7 @@ func (m *ModelUsage) String() string {type OperationLog struct {EventTime time.Time `json:"event_time"`UserID string `json:"user_id"`+ UserName string `json:"user_name"`IPAddress string `json:"ip_address"`Operation string `json:"operation"`APIPath string `json:"api_path"`diff --git a/internal/handler/user.go b/internal/handler/user.goindex cdbc2df6aa..09bc2bbf7e 100644--- a/internal/handler/user.go+++ b/internal/handler/user.go@@ -144,7 +144,7 @@ func (h *UserHandler) Login(c *gin.Context) {operationLog.Error = errreturn}- operationLog.ResourceName = req.Username+ operationLog.UserName = req.Usernameuser, code, err := h.userService.Login(ctx, &req)if err != nil {@@ -214,7 +214,7 @@ func (h *UserHandler) LoginByEmail(c *gin.Context) {operationLog.Error = errreturn}- operationLog.ResourceName = req.Email+ operationLog.UserName = req.Emailif !local.IsAdminAvailable() {adminStatus := local.GetAdminStatus()@@ -344,6 +344,7 @@ func (h *UserHandler) Logout(c *gin.Context) {}user := identity.UseroperationLog.UserID = user.ID+ operationLog.UserName = user.Email// Logout usercode, err = h.userService.Logout(ctx, user)