feat: support tool level permission control in ui (#2133)
This commit is contained in:
+64
-1
@@ -39,7 +39,7 @@
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Tool"
|
||||
"$ref": "#/components/schemas/ToolInfo"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -196,6 +196,39 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/config/permissions": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"super::routes::config_management"
|
||||
],
|
||||
"operationId": "upsert_permissions",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UpsertPermissionsQuery"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Permission update completed",
|
||||
"content": {
|
||||
"text/plain": {
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/config/providers": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -783,6 +816,22 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"ToolPermission": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"tool_name",
|
||||
"permission"
|
||||
],
|
||||
"properties": {
|
||||
"permission": {
|
||||
"$ref": "#/components/schemas/PermissionLevel"
|
||||
},
|
||||
"tool_name": {
|
||||
"type": "string",
|
||||
"description": "Unique identifier and name of the tool, format <extension_name>__<tool_name>"
|
||||
}
|
||||
}
|
||||
},
|
||||
"UpsertConfigQuery": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -799,6 +848,20 @@
|
||||
},
|
||||
"value": {}
|
||||
}
|
||||
},
|
||||
"UpsertPermissionsQuery": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"tool_permissions"
|
||||
],
|
||||
"properties": {
|
||||
"tool_permissions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/ToolPermission"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user