-
Notifications
You must be signed in to change notification settings - Fork 6
Refactor operation record ce #567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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:
|
| OperationAction: "login", | ||
| OperationProjectName: "", | ||
| OperationStatus: "succeeded", | ||
| OperationI18nContent: i18nPkg.ConvertStr2I18nAsDefaultLang(fmt.Sprintf("用户 %s 通过OAuth2登入系统", user.Name)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里不需要国际化吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
之前做国际化的那个版本之后就不强制要国际化了,这里的话中英文模式下都是显示默认的中文
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 定义,新增操作记录接口