Skip to content

Commit

Permalink
feat: add role template for view umami share page (#18)
Browse files Browse the repository at this point in the history
添加访问 Umami 共享页面的角色模板。

/kind feature

```release-note
添加访问 Umami 共享页面的角色模板。
```
  • Loading branch information
ruibaby authored Dec 5, 2023
1 parent 30e5b2b commit 94e34d1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ application-local.yml
application-local.yaml
application-local.properties

/admin-frontend/node_modules/
/console/node_modules/
/workplace
/node_modules
/node_modules
/src/main/resources/console
1 change: 1 addition & 0 deletions console/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default definePlugin({
meta: {
title: "Umami",
searchable: true,
permissions: ["plugin:umami:share-page:view"],
menu: {
name: "Umami",
group: "tool",
Expand Down
3 changes: 0 additions & 3 deletions src/main/resources/console/main.js

This file was deleted.

16 changes: 16 additions & 0 deletions src/main/resources/extensions/umami-role-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1alpha1
kind: "Role"
metadata:
name: role-template-view-umami
labels:
halo.run/role-template: "true"
annotations:
rbac.authorization.halo.run/module: "Umami"
rbac.authorization.halo.run/display-name: "允许访问 Umami 页面"
rbac.authorization.halo.run/ui-permissions: |
["plugin:umami:share-page:view"]
rules:
- apiGroups: [""]
resources: ["configmaps"]
resourceNames: ["plugin-umami-configMap"]
verbs: ["get"]

0 comments on commit 94e34d1

Please sign in to comment.