-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
重构 audit 相关代码, 改为面向对象实现 #2348
Merged
Merged
重构 audit 相关代码, 改为面向对象实现 #2348
Conversation
This file contains 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
你好!感谢你反馈的问题/bug,但是你的描述好像是空的,我们需要你完整的信息,这样才能帮你解决问题 如果不知道怎么写,在新建issue的时候有若干个模板可供选择,祝好! |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2348 +/- ##
==========================================
+ Coverage 75.71% 75.95% +0.24%
==========================================
Files 108 111 +3
Lines 15727 15736 +9
==========================================
+ Hits 11907 11953 +46
+ Misses 3820 3783 -37
☔ View full report in Codecov by Sentry. |
LeoQuote
force-pushed
the
refactor_audit
branch
from
November 1, 2023 06:53
591f5fe
to
328bd2f
Compare
finovy
pushed a commit
to finovy/Archery
that referenced
this pull request
Nov 10, 2023
* 重构 audit 相关代码, 改为面向对象实现 * 使用 pytst 运行测试 * fix tests * fix coverage generation * more coverage * 修复 audit_groups 的类型错误 * 不抛错给用户, 改为输出日志
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.
audit 的代码实现的比较死, 没有模块化, 二次开发时不方便, 本 pr 将audit 相关代码转成面向对象的实现, 把 SqlWorkflow, WorkflowAudit 等对象作为属性传给新的 audit class, 方便audit 在处置时读取相关对象的信息, 进行个性化处置.
这次抽象出了
两个顶层方法, 可以给 view 层调用, 分别用来创建审批流和 操作审批流
还有
这几个小方法, 可供二次开发时继承覆盖
如开发者需要实现个性化审批流程, 可以预先建立权限组, 继承 AuditV2 , 并重新实现 generate_audit_setting 方法, 即可实现简单的自定义审批流.