You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why: The suggestion introduces an error handling check for an empty rangeUids array, which prevents potential issues with an unexpected empty SQL IN clause. This improvement is accurate and directly modifies the existing code block to enhance reliability.
Why: The suggestion correctly addresses a potential issue with an empty rangeUids slice before constructing the SQL filter, improving error handling. However, the change is moderate in impact and does not fix a critical bug.
Why: The suggestion adds a check on the length of viewQuickAuditRecordPermission.RangeUids to guard against empty slices, which improves robustness. The improved code snippet correctly reflects the intended modification without altering the overall logic.
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
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
assign in @LordofAvernus
关联的 issue
https://github.com/actiontech/sqle-ee/issues/2387#issuecomment-3027273488
描述你的变更
查看快捷审核记录在有查看快捷审核记录权限的时候需要根据数据源做筛选
确认项(pr提交后操作)
Tip
请在指定复审人之前,确认并完成以下事项,完成后✅
not_compatibleneed_update_docDescription
修改审核记录权限校验逻辑
调整查询参数由 filter_instance_id 改为 filter_instance_ids
添加多实例过滤交集计算的工具函数
更新 SQL 模板中实例过滤语句
Changes diagram
Changes walkthrough 📝
sql_audit_record.go
更新审核记录权限与过滤逻辑sqle/api/controller/v1/sql_audit_record.go
strconv包dms.NewUserPermission替代旧权限校验sql_audit_record_list.go
更新 SQL 查询条件过滤参数sqle/model/sql_audit_record_list.go
filter_instance_id改为filter_instance_idsutil.go
添加工具函数 FindIntersectionsqle/utils/util.go
FindIntersection函数计算字符串交集