Skip to content

Commit

Permalink
[release-2.0] Fix invalid attachment role templates (#3044)
Browse files Browse the repository at this point in the history
This is an automated cherry-pick of #3024

/assign JohnNiang

```release-note
修复附件权限定义的错误
```
  • Loading branch information
halo-dev-bot authored Dec 26, 2022
1 parent bf43624 commit 3800bc5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/main/resources/extensions/role-template-attachment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ metadata:
["system:attachments:manage"]
rules:
- apiGroups: [ "storage.halo.run" ]
resources: [ "attachments" ]
resources: [ "attachments", "policies", "policytemplates", "groups" ]
verbs: [ "*" ]
- apiGroups: [ "api.console.halo.run" ]
resources: [ "attachments" ]
verbs: [ "*" ]
- nonResourceURLs: [ "/apis/api.console.halo.run/attachments/upload" ]
verbs: [ "post" ]
- apiGroups: [ "" ]
resources: [ "settings" ]
verbs: [ "get" ]
- nonResourceURLs: [ "/apis/api.console.halo.run/v1alpha1/attachments/upload" ]
verbs: [ "create" ]
---
apiVersion: v1alpha1
kind: "Role"
Expand All @@ -33,7 +36,7 @@ metadata:
["system:attachments:view"]
rules:
- apiGroups: [ "storage.halo.run" ]
resources: [ "attachments" ]
resources: [ "attachments", "policies", "policytemplates", "groups" ]
verbs: [ "get", "list" ]
- apiGroups: [ "api.console.halo.run" ]
resources: [ "attachments" ]
Expand Down

0 comments on commit 3800bc5

Please sign in to comment.