fix: 已锁定文章禁止提交审核,隐藏提交按钮
- SubmitForAudit 新增 IsLocked 检查,锁定文章不可提交审核 - posts/show.html:已锁定文章不显示"提交审核"按钮
This commit is contained in:
@ -251,6 +251,9 @@ func (s *PostService) SubmitForAudit(postID uint) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if post.IsLocked {
|
||||
return common.ErrPostCannotEdit
|
||||
}
|
||||
if post.Status != model.PostStatusDraft && post.Status != model.PostStatusRejected {
|
||||
return common.ErrPostCannotSubmit
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user