Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add role template for view umami share page #18

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]
Loading