mirror of
https://github.com/coder/coder.git
synced 2026-11-01 04:47:17 +08:00
feat: add chat model config RBAC resource (#27957)
Add the `chat_model_config` RBAC resource, actions, and API key scopes. This layer includes the scope migration and generated API types. Model list queries apply token scopes, SQL authorization filters, and row ACLs. Write and default-management handlers keep deployment configuration authorization until the next API layer replaces it. Depends on #27956 _This pull request description was generated by Coder Agents._
This commit is contained in:
@@ -73,6 +73,13 @@ export const RBACResourceActions: Partial<
|
||||
share: "share a chat with other users or groups",
|
||||
update: "update chat title or settings",
|
||||
},
|
||||
chat_model_config: {
|
||||
create: "create a new chat model config",
|
||||
delete: "delete a chat model config",
|
||||
read: "read chat model configs",
|
||||
share: "share a chat model config with other users or groups",
|
||||
update: "update a chat model config",
|
||||
},
|
||||
connection_log: {
|
||||
read: "read connection logs",
|
||||
update: "upsert connection log entries",
|
||||
|
||||
Generated
+16
@@ -707,6 +707,12 @@ export type APIKeyScope =
|
||||
| "chat:*"
|
||||
| "chat:create"
|
||||
| "chat:delete"
|
||||
| "chat_model_config:*"
|
||||
| "chat_model_config:create"
|
||||
| "chat_model_config:delete"
|
||||
| "chat_model_config:read"
|
||||
| "chat_model_config:share"
|
||||
| "chat_model_config:update"
|
||||
| "chat:read"
|
||||
| "chat:share"
|
||||
| "chat:update"
|
||||
@@ -953,6 +959,12 @@ export const APIKeyScopes: APIKeyScope[] = [
|
||||
"chat:*",
|
||||
"chat:create",
|
||||
"chat:delete",
|
||||
"chat_model_config:*",
|
||||
"chat_model_config:create",
|
||||
"chat_model_config:delete",
|
||||
"chat_model_config:read",
|
||||
"chat_model_config:share",
|
||||
"chat_model_config:update",
|
||||
"chat:read",
|
||||
"chat:share",
|
||||
"chat:update",
|
||||
@@ -7885,6 +7897,7 @@ export type RBACResource =
|
||||
| "boundary_log"
|
||||
| "boundary_usage"
|
||||
| "chat"
|
||||
| "chat_model_config"
|
||||
| "connection_log"
|
||||
| "crypto_key"
|
||||
| "debug_info"
|
||||
@@ -7939,6 +7952,7 @@ export const RBACResources: RBACResource[] = [
|
||||
"boundary_log",
|
||||
"boundary_usage",
|
||||
"chat",
|
||||
"chat_model_config",
|
||||
"connection_log",
|
||||
"crypto_key",
|
||||
"debug_info",
|
||||
@@ -8093,6 +8107,7 @@ export type ResourceType =
|
||||
| "api_key"
|
||||
| "chat"
|
||||
| "chat_instruction_settings"
|
||||
| "chat_model_config"
|
||||
| "convert_login"
|
||||
| "custom_role"
|
||||
| "git_ssh_key"
|
||||
@@ -8133,6 +8148,7 @@ export const ResourceTypes: ResourceType[] = [
|
||||
"api_key",
|
||||
"chat",
|
||||
"chat_instruction_settings",
|
||||
"chat_model_config",
|
||||
"convert_login",
|
||||
"custom_role",
|
||||
"git_ssh_key",
|
||||
|
||||
Reference in New Issue
Block a user