From d86ddf4a048cbac30cdc7faffc235e5c337f5034 Mon Sep 17 00:00:00 2001 From: guqing <38999863+guqing@users.noreply.github.com> Date: Sun, 28 Apr 2024 13:50:11 +0800 Subject: [PATCH] fix: permissions for post content versions (#5819) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /kind bug /area core /milestone 2.15.x #### What this PR does / why we need it: 修复拥有文章管理权限的用户无法正常使用版本历史的问题 #### Which issue(s) this PR fixes: Fixes #5815 #### Does this PR introduce a user-facing change? ```release-note 修复拥有文章管理权限的用户无法正常使用版本历史的问题 ``` --- .../src/main/resources/extensions/role-template-post.yaml | 2 +- .../src/main/resources/extensions/role-template-singlepage.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/src/main/resources/extensions/role-template-post.yaml b/application/src/main/resources/extensions/role-template-post.yaml index 9089d4e46..d48246b0c 100644 --- a/application/src/main/resources/extensions/role-template-post.yaml +++ b/application/src/main/resources/extensions/role-template-post.yaml @@ -37,5 +37,5 @@ rules: resources: [ "posts" ] verbs: [ "get", "list" ] - apiGroups: [ "api.console.halo.run" ] - resources: [ "posts", "posts/head-content", "posts/release-content", "posts/snapshot" ] + resources: [ "posts", "posts/head-content", "posts/release-content", "posts/snapshot", "posts/content" ] verbs: [ "get", "list" ] diff --git a/application/src/main/resources/extensions/role-template-singlepage.yaml b/application/src/main/resources/extensions/role-template-singlepage.yaml index 010c2e3c5..8dd5b1c70 100644 --- a/application/src/main/resources/extensions/role-template-singlepage.yaml +++ b/application/src/main/resources/extensions/role-template-singlepage.yaml @@ -35,5 +35,5 @@ rules: resources: [ "singlepages" ] verbs: [ "get", "list" ] - apiGroups: [ "api.console.halo.run" ] - resources: [ "singlepages", "singlepages/head-content", "singlepages/release-content", "singlepages/snapshot" ] + resources: [ "singlepages", "singlepages/head-content", "singlepages/release-content", "singlepages/snapshot", "singlepages/content" ] verbs: [ "get", "list" ]