Conversation
- Introduced new API endpoints for adding, listing, and exporting operation records. - Implemented data structures and validation for operation records. - Added logging for user login and logout actions, capturing relevant details. - Created repository and use case layers for operation record management. - Integrated operation record functionality into the existing DMS service.
- Implemented user ID retrieval from context. - Added admin/sys user permission checks before allowing operation record addition. - Enhanced error handling for insufficient permissions.
- Added fields for global view permissions and accessible project names in ListOperationRecordOption. - Implemented project filtering logic based on user permissions in ListOperationRecords and ExportOperationRecords methods. - Ensured project administrators can only view records for their accessible projects unless global view permission is granted.
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
iwanghc
reviewed
Jan 29, 2026
| OperationAction: "login", | ||
| OperationProjectName: "", | ||
| OperationStatus: "succeeded", | ||
| OperationI18nContent: i18nPkg.ConvertStr2I18nAsDefaultLang(fmt.Sprintf("用户 %s 通过OAuth2登入系统", user.Name)), |
Collaborator
Author
There was a problem hiding this comment.
之前做国际化的那个版本之后就不强制要国际化了,这里的话中英文模式下都是显示默认的中文
iwanghc
approved these changes
Jan 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
关联的 issue
https://github.com/actiontech/sqle-ee/issues/2627
描述你的变更
确认项(pr提交后操作)
Tip
请在指定复审人之前,确认并完成以下事项,完成后✅
not_compatibleneed_update_docDescription
新增操作记录相关数据结构及 API 定义
添加用户登录与登出操作记录功能调用
集成权限校验和数据过滤功能
更新 swagger 文档和路由配置
Diagram Walkthrough
File Walkthrough
8 files
添加操作记录数据结构和 API 定义添加登录登出操作记录功能调用新增操作记录 API 路由配置新增业务层操作记录逻辑接口添加 CE 版本操作记录占位实现集成 OperationRecordUsecase 注入服务新增数据库模型 OperationRecord添加操作记录存储及查询逻辑2 files
更新 swagger 定义,新增操作记录接口更新 swagger 定义,新增操作记录接口