mirror of
https://github.com/halo-dev/plugin-s3.git
synced 2025-10-16 15:30:00 +00:00
perf: improve s3link role permissions (#89)
1. 新建用户,仅赋予 s3link 权限
2. 测试 关联s3文件功能是否 正常使用
请使用 <ff7af9f0d9
> 之后的版本进行测试
```release-note
完善 s3link 角色权限
```
This commit is contained in:
@@ -2,7 +2,7 @@ plugins {
|
|||||||
id 'java'
|
id 'java'
|
||||||
id "com.github.node-gradle.node" version "5.0.0"
|
id "com.github.node-gradle.node" version "5.0.0"
|
||||||
id "io.freefair.lombok" version "8.0.1"
|
id "io.freefair.lombok" version "8.0.1"
|
||||||
id "run.halo.plugin.devtools" version "0.0.6"
|
id "run.halo.plugin.devtools" version "0.0.7"
|
||||||
}
|
}
|
||||||
|
|
||||||
group 'run.halo.s3os'
|
group 'run.halo.s3os'
|
||||||
@@ -16,7 +16,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation platform('run.halo.tools.platform:plugin:2.9.0-SNAPSHOT')
|
implementation platform('run.halo.tools.platform:plugin:2.10.0-SNAPSHOT')
|
||||||
compileOnly 'run.halo.app:api'
|
compileOnly 'run.halo.app:api'
|
||||||
|
|
||||||
implementation platform('software.amazon.awssdk:bom:2.19.8')
|
implementation platform('software.amazon.awssdk:bom:2.19.8')
|
||||||
@@ -33,7 +33,7 @@ configurations.runtimeClasspath {
|
|||||||
|
|
||||||
|
|
||||||
halo {
|
halo {
|
||||||
version = '2.9.0'
|
version = '2.10.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
haloPlugin {
|
haloPlugin {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import {definePlugin} from "@halo-dev/console-shared";
|
import {definePlugin} from "@halo-dev/console-shared";
|
||||||
import type {PluginTab} from "@halo-dev/console-shared";
|
import type {PluginTab} from "@halo-dev/console-shared";
|
||||||
import HomeView from "./views/HomeView.vue";
|
import S3Link from "./views/S3Link.vue";
|
||||||
import {markRaw} from "vue";
|
import {markRaw} from "vue";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
@@ -12,8 +12,8 @@ export default definePlugin({
|
|||||||
{
|
{
|
||||||
id: "s3-link",
|
id: "s3-link",
|
||||||
label: "关联S3文件",
|
label: "关联S3文件",
|
||||||
component: markRaw(HomeView),
|
component: markRaw(S3Link),
|
||||||
permissions: []
|
permissions: ["plugin:s3os:link"]
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
File diff suppressed because one or more lines are too long
23
src/main/resources/extensions/s3os-role-template.yaml
Normal file
23
src/main/resources/extensions/s3os-role-template.yaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: v1alpha1
|
||||||
|
kind: "Role"
|
||||||
|
metadata:
|
||||||
|
name: role-template-s3os-link
|
||||||
|
labels:
|
||||||
|
halo.run/role-template: "true"
|
||||||
|
annotations:
|
||||||
|
rbac.authorization.halo.run/dependencies: |
|
||||||
|
[ "role-template-manage-attachments", "role-template-view-plugins" ]
|
||||||
|
rbac.authorization.halo.run/module: "S3 Attachments Management"
|
||||||
|
rbac.authorization.halo.run/display-name: "S3 Link"
|
||||||
|
rbac.authorization.halo.run/ui-permissions: |
|
||||||
|
["plugin:s3os:link"]
|
||||||
|
rules:
|
||||||
|
- apiGroups: [ "s3os.halo.run" ]
|
||||||
|
resources: [ "policies" ]
|
||||||
|
resourceNames: [ "s3" ]
|
||||||
|
verbs: [ "get", "list" ]
|
||||||
|
- apiGroups: [ "s3os.halo.run" ]
|
||||||
|
resources: [ "objects" ]
|
||||||
|
verbs: [ "get", "list" ]
|
||||||
|
- nonResourceURLs: ["/apis/s3os.halo.run/v1alpha1/attachments/link"]
|
||||||
|
verbs: [ "create" ]
|
Reference in New Issue
Block a user