Skip to content

Commit

Permalink
fix: missing notifier descriptors permissions in notification role te…
Browse files Browse the repository at this point in the history
…mplate
  • Loading branch information
guqing committed Mar 11, 2024
1 parent 10d834d commit bc1019f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Expand Up @@ -4,12 +4,14 @@ metadata:
name: role-template-notifier-config
labels:
halo.run/role-template: "true"
halo.run/hidden: "true"
annotations:
rbac.authorization.halo.run/module: "Notification Configuration"
rbac.authorization.halo.run/display-name: "Configure Notifier"
rbac.authorization.halo.run/ui-permissions: |
["system:notifier:configuration"]
rules:
- apiGroups: [ "notification.halo.run" ]
resources: [ "notifierDescriptors" ]
verbs: [ "*" ]

Check warning

Code scanning / SonarCloud

Wildcards should not be used to define RBAC permissions Medium

Do not use wildcards when defining RBAC permissions. See more on SonarCloud
- apiGroups: [ "api.console.halo.run" ]
resources: [ "notifiers/sender-config" ]
verbs: [ "get", "update" ]
Expand Up @@ -5,11 +5,11 @@ metadata:
labels:
halo.run/role-template: "true"
annotations:
rbac.authorization.halo.run/dependencies: "[ \"role-template-view-settings\" ]"
rbac.authorization.halo.run/dependencies: "[ \"role-template-view-settings\", \"role-template-notifier-config\" ]"
rbac.authorization.halo.run/module: "Settings Management"
rbac.authorization.halo.run/display-name: "Setting Manage"
rbac.authorization.halo.run/ui-permissions: |
["system:settings:manage"]
["system:settings:manage", "system:notifier:configuration"]
rules:
- apiGroups: [ "" ]
resources: [ "settings" ]
Expand Down

0 comments on commit bc1019f

Please sign in to comment.