mirror of https://github.com/halo-dev/halo
Fix the problem of unpublishing and recycling posts by member of post manager (#2701)
#### What type of PR is this? /kind bug /area core /milestone 2.0 #### What this PR does / why we need it: This PR refines the role template of posts to allow post managers to unpublish and recycle a specific post. Before that, post managers will be forbidden to unpublishing and recycling posts. You can see the screenshot below:  After that, we can unpublish and recycle posts successfully. You can see the screenshot below:  #### Special notes for your reviewer: Steps to test manually: 1. Create a `Role` with `Posts Management` permission 2. Create an `User` with the role bound 3. Login with the `User` 4. Create a `Post` and publish it 5. Unpublish the post and Recycle it #### Does this PR introduce a user-facing change? ```release-note 修复无法“取消发布”和“删除”文章的错误 ```pull/2705/head
parent
c86e8df267
commit
04a7b67fe9
|
@ -16,7 +16,7 @@ rules:
|
|||
resources: [ "posts" ]
|
||||
verbs: [ "*" ]
|
||||
- apiGroups: [ "api.console.halo.run" ]
|
||||
resources: [ "posts", "posts/publish", "contents", "contents/publish" ]
|
||||
resources: [ "posts", "posts/publish", "posts/unpublish", "posts/recycle", "contents", "contents/publish" ]
|
||||
verbs: [ "create", "patch", "update", "delete", "deletecollection" ]
|
||||
---
|
||||
apiVersion: v1alpha1
|
||||
|
|
Loading…
Reference in New Issue