-
-
Notifications
You must be signed in to change notification settings - Fork 9.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
refactor: transition behavior of post state after category updated #1785
Conversation
/kind bug |
测试用例:
|
/cc @halo-dev/sig-halo |
/cc @halo-dev/sig-halo 大家好,建议大家尽可能的测试此 PR。 |
/retitle refactor: transition behavior of post state after category updated |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: guqing, ruibaby The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does?
更改分类更新后的文章状态过渡行为,由于情况复杂该PR并没有提供单元测试,目前只是在相对合理的情况下解决它有些场景不完善,等待2.0重新设计加密功能。
要考虑以下情况:
分类被更新: 判断密码,If 从空到非空(转私密),Else 从非空到空(公开)
分类被删除:判断被删除分类的密码,1.非空,检查所属该分类及其子分类的文章综合文章私密性来决定最终是私密还是公开,2.空则不用管
针对父分类的私密性对当前分类的影响分析:
- 当前分类没密码:私密状态,密码状态变更也为私密
Why we need it?
之前更新了分类会将所属分类的文章转草稿不合理,现更改它的行为
Fix #1779