mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-09-10 22:20:25 +00:00
feat(task): replace built-in task adaptors with a sandboxed JS plugin system (#7076)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package authz
|
||||
|
||||
const (
|
||||
ResourceTaskPlugin = "task_plugin"
|
||||
|
||||
ActionBind = "bind"
|
||||
)
|
||||
|
||||
var TaskPluginBind = Permission{Resource: ResourceTaskPlugin, Action: ActionBind}
|
||||
|
||||
func init() {
|
||||
RegisterResource(ResourceDefinition{
|
||||
Resource: ResourceTaskPlugin,
|
||||
LabelKey: "Task Plugin",
|
||||
Actions: []ActionDefinition{
|
||||
{
|
||||
Action: ActionBind,
|
||||
LabelKey: "Bind task plugins",
|
||||
DescriptionKey: "List registered task plugins and bind them when creating or editing task plugin channels.",
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user