Skip to content

Commit

Permalink
feat: add role template for view umami share page
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Wang <[email protected]>
  • Loading branch information
ruibaby committed Dec 4, 2023
1 parent 30e5b2b commit 9ad1839
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 9ad1839

Please sign in to comment.