mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(coderd/agentapi): support terraform-defined subagent ids (#21837)
Update `coderd/agentapi` to handle pre-created sub agents
This commit is contained in:
@@ -181,6 +181,7 @@ const (
|
||||
APIKeyScopeWorkspaceStart APIKeyScope = "workspace:start"
|
||||
APIKeyScopeWorkspaceStop APIKeyScope = "workspace:stop"
|
||||
APIKeyScopeWorkspaceUpdate APIKeyScope = "workspace:update"
|
||||
APIKeyScopeWorkspaceUpdateAgent APIKeyScope = "workspace:update_agent"
|
||||
APIKeyScopeWorkspaceAgentDevcontainersAll APIKeyScope = "workspace_agent_devcontainers:*"
|
||||
APIKeyScopeWorkspaceAgentDevcontainersCreate APIKeyScope = "workspace_agent_devcontainers:create"
|
||||
APIKeyScopeWorkspaceAgentResourceMonitorAll APIKeyScope = "workspace_agent_resource_monitor:*"
|
||||
@@ -199,6 +200,7 @@ const (
|
||||
APIKeyScopeWorkspaceDormantStart APIKeyScope = "workspace_dormant:start"
|
||||
APIKeyScopeWorkspaceDormantStop APIKeyScope = "workspace_dormant:stop"
|
||||
APIKeyScopeWorkspaceDormantUpdate APIKeyScope = "workspace_dormant:update"
|
||||
APIKeyScopeWorkspaceDormantUpdateAgent APIKeyScope = "workspace_dormant:update_agent"
|
||||
APIKeyScopeWorkspaceProxyAll APIKeyScope = "workspace_proxy:*"
|
||||
APIKeyScopeWorkspaceProxyCreate APIKeyScope = "workspace_proxy:create"
|
||||
APIKeyScopeWorkspaceProxyDelete APIKeyScope = "workspace_proxy:delete"
|
||||
|
||||
@@ -64,6 +64,7 @@ const (
|
||||
ActionShare RBACAction = "share"
|
||||
ActionUnassign RBACAction = "unassign"
|
||||
ActionUpdate RBACAction = "update"
|
||||
ActionUpdateAgent RBACAction = "update_agent"
|
||||
ActionUpdatePersonal RBACAction = "update_personal"
|
||||
ActionUse RBACAction = "use"
|
||||
ActionViewInsights RBACAction = "view_insights"
|
||||
@@ -112,9 +113,9 @@ var RBACResourceActions = map[RBACResource][]RBACAction{
|
||||
ResourceUser: {ActionCreate, ActionDelete, ActionRead, ActionReadPersonal, ActionUpdate, ActionUpdatePersonal},
|
||||
ResourceUserSecret: {ActionCreate, ActionDelete, ActionRead, ActionUpdate},
|
||||
ResourceWebpushSubscription: {ActionCreate, ActionDelete, ActionRead},
|
||||
ResourceWorkspace: {ActionApplicationConnect, ActionCreate, ActionCreateAgent, ActionDelete, ActionDeleteAgent, ActionRead, ActionShare, ActionSSH, ActionWorkspaceStart, ActionWorkspaceStop, ActionUpdate},
|
||||
ResourceWorkspace: {ActionApplicationConnect, ActionCreate, ActionCreateAgent, ActionDelete, ActionDeleteAgent, ActionRead, ActionShare, ActionSSH, ActionWorkspaceStart, ActionWorkspaceStop, ActionUpdate, ActionUpdateAgent},
|
||||
ResourceWorkspaceAgentDevcontainers: {ActionCreate},
|
||||
ResourceWorkspaceAgentResourceMonitor: {ActionCreate, ActionRead, ActionUpdate},
|
||||
ResourceWorkspaceDormant: {ActionApplicationConnect, ActionCreate, ActionCreateAgent, ActionDelete, ActionDeleteAgent, ActionRead, ActionShare, ActionSSH, ActionWorkspaceStart, ActionWorkspaceStop, ActionUpdate},
|
||||
ResourceWorkspaceDormant: {ActionApplicationConnect, ActionCreate, ActionCreateAgent, ActionDelete, ActionDeleteAgent, ActionRead, ActionShare, ActionSSH, ActionWorkspaceStart, ActionWorkspaceStop, ActionUpdate, ActionUpdateAgent},
|
||||
ResourceWorkspaceProxy: {ActionCreate, ActionDelete, ActionRead, ActionUpdate},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user