From c7bf87b361e3c119682ffaf4c0d2b975d53e50dd Mon Sep 17 00:00:00 2001 From: John Niang Date: Fri, 28 Jun 2024 15:24:58 +0800 Subject: [PATCH] Rectify role templates about PAT and 2FA endpoints (#6201) #### What type of PR is this? /kind bug /area core /milestone 2.17.x #### What this PR does / why we need it: In PR , I changed the api group of PAT and 2FA endpoints, but I forgot to change the corresponding role templates. So other users except admin will encounter 403 error like . #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/6199 #### Does this PR introduce a user-facing change? ```release-note None ``` --- .../resources/extensions/role-template-authenticated.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/src/main/resources/extensions/role-template-authenticated.yaml b/application/src/main/resources/extensions/role-template-authenticated.yaml index 24a13fa24..a5d9200bd 100644 --- a/application/src/main/resources/extensions/role-template-authenticated.yaml +++ b/application/src/main/resources/extensions/role-template-authenticated.yaml @@ -110,10 +110,10 @@ metadata: halo.run/role-template: "true" halo.run/hidden: "true" rules: - - apiGroups: [ "api.security.halo.run" ] + - apiGroups: [ "uc.api.security.halo.run" ] resources: [ "personalaccesstokens" ] verbs: [ "*" ] - - apiGroups: [ "api.security.halo.run" ] + - apiGroups: [ "uc.api.security.halo.run" ] resources: [ "personalaccesstokens/actions" ] verbs: [ "update" ] @@ -126,7 +126,7 @@ metadata: halo.run/role-template: "true" halo.run/hidden: "true" rules: - - apiGroups: [ "api.security.halo.run" ] + - apiGroups: [ "uc.api.security.halo.run" ] resources: [ "authentications", "authentications/totp", "authentications/settings" ] verbs: [ "*" ] - apiGroups: [ "uc.api.security.halo.run" ]