fix: missing notifier descriptors permissions in notification role template (#5489)

#### What type of PR is this?
/kind bug
/area core
/milestone 2.14.x

#### What this PR does / why we need it:
修复分配通知器权限时一片空白的问题

- 隐藏了原先权限中展示的通知器配置权限选项
- 系统设置的权限中依赖了通知器配置权限,但需要有系统设置管理权限才会展示通知配置的 Tab

Fixes #5492

#### Does this PR introduce a user-facing change?
```release-note
修复仅拥有通知器配置权限时无法修改配置的问题
```
pull/5516/head
guqing 2024-03-15 23:38:08 +08:00 committed by GitHub
parent 5cf4eae583
commit 26dc24cc00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 9 additions and 7 deletions

View File

@ -4,12 +4,14 @@ metadata:
name: role-template-notifier-config name: role-template-notifier-config
labels: labels:
halo.run/role-template: "true" halo.run/role-template: "true"
halo.run/hidden: "true"
annotations: annotations:
rbac.authorization.halo.run/module: "Notification Configuration" rbac.authorization.halo.run/module: "Notification Configuration"
rbac.authorization.halo.run/display-name: "Configure Notifier" rbac.authorization.halo.run/display-name: "Configure Notifier"
rbac.authorization.halo.run/ui-permissions: |
["system:notifier:configuration"]
rules: rules:
- apiGroups: [ "notification.halo.run" ]
resources: [ "notifierDescriptors" ]
verbs: [ "*" ]
- apiGroups: [ "api.console.halo.run" ] - apiGroups: [ "api.console.halo.run" ]
resources: [ "notifiers/sender-config" ] resources: [ "notifiers/sender-config" ]
verbs: [ "get", "update" ] verbs: [ "get", "update" ]

View File

@ -5,11 +5,11 @@ metadata:
labels: labels:
halo.run/role-template: "true" halo.run/role-template: "true"
annotations: 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/module: "Settings Management"
rbac.authorization.halo.run/display-name: "Setting Manage" rbac.authorization.halo.run/display-name: "Setting Manage"
rbac.authorization.halo.run/ui-permissions: | rbac.authorization.halo.run/ui-permissions: |
["system:settings:manage"] ["system:settings:manage", "system:notifier:configuration"]
rules: rules:
- apiGroups: [ "" ] - apiGroups: [ "" ]
resources: [ "settings" ] resources: [ "settings" ]

View File

@ -1369,7 +1369,7 @@ core:
Cache Management: Cache Cache Management: Cache
Cache Manage: Cache Manage Cache Manage: Cache Manage
Notification Configuration: Notification Configuration Notification Configuration: Notification Configuration
Configure Notifier: Configure Notifier role-template-notifier-config: Configure Notifier
Post Attachment Manager: Allow images to be uploaded in posts Post Attachment Manager: Allow images to be uploaded in posts
Post Author: Allows you to manage your own posts Post Author: Allows you to manage your own posts
Post Contributor: Contributions allowed Post Contributor: Contributions allowed

View File

@ -1317,7 +1317,7 @@ core:
Cache Management: 缓存 Cache Management: 缓存
Cache Manage: 缓存管理 Cache Manage: 缓存管理
Notification Configuration: 通知配置 Notification Configuration: 通知配置
Configure Notifier: 配置通知器 role-template-notifier-config: 配置通知器
Post Contributor: 允许投稿 Post Contributor: 允许投稿
Post Author: 允许管理自己的文章 Post Author: 允许管理自己的文章
Post Attachment Manager: 允许在文章中上传图片 Post Attachment Manager: 允许在文章中上传图片

View File

@ -1282,7 +1282,7 @@ core:
Actuator Manage: 訪問系統指標 Actuator Manage: 訪問系統指標
Cache Management: 緩存 Cache Management: 緩存
Cache Manage: 緩存管理 Cache Manage: 緩存管理
Configure Notifier: 配置通知器 role-template-notifier-config: 配置通知器
Notification Configuration: 通知配置 Notification Configuration: 通知配置
Post Attachment Manager: 允許在文章中上傳圖片 Post Attachment Manager: 允許在文章中上傳圖片
Post Author: 允許管理自己的文章 Post Author: 允許管理自己的文章