mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add new workspace:share action type (#20198)
Closes [coder/internal#1012](https://github.com/coder/internal/issues/1012)
This commit is contained in:
@@ -172,6 +172,7 @@ const (
|
||||
APIKeyScopeWorkspaceDelete APIKeyScope = "workspace:delete"
|
||||
APIKeyScopeWorkspaceDeleteAgent APIKeyScope = "workspace:delete_agent"
|
||||
APIKeyScopeWorkspaceRead APIKeyScope = "workspace:read"
|
||||
APIKeyScopeWorkspaceShare APIKeyScope = "workspace:share"
|
||||
APIKeyScopeWorkspaceSsh APIKeyScope = "workspace:ssh"
|
||||
APIKeyScopeWorkspaceStart APIKeyScope = "workspace:start"
|
||||
APIKeyScopeWorkspaceStop APIKeyScope = "workspace:stop"
|
||||
@@ -189,6 +190,7 @@ const (
|
||||
APIKeyScopeWorkspaceDormantDelete APIKeyScope = "workspace_dormant:delete"
|
||||
APIKeyScopeWorkspaceDormantDeleteAgent APIKeyScope = "workspace_dormant:delete_agent"
|
||||
APIKeyScopeWorkspaceDormantRead APIKeyScope = "workspace_dormant:read"
|
||||
APIKeyScopeWorkspaceDormantShare APIKeyScope = "workspace_dormant:share"
|
||||
APIKeyScopeWorkspaceDormantSsh APIKeyScope = "workspace_dormant:ssh"
|
||||
APIKeyScopeWorkspaceDormantStart APIKeyScope = "workspace_dormant:start"
|
||||
APIKeyScopeWorkspaceDormantStop APIKeyScope = "workspace_dormant:stop"
|
||||
|
||||
@@ -60,6 +60,7 @@ const (
|
||||
ActionRead RBACAction = "read"
|
||||
ActionReadPersonal RBACAction = "read_personal"
|
||||
ActionSSH RBACAction = "ssh"
|
||||
ActionShare RBACAction = "share"
|
||||
ActionUnassign RBACAction = "unassign"
|
||||
ActionUpdate RBACAction = "update"
|
||||
ActionUpdatePersonal RBACAction = "update_personal"
|
||||
@@ -109,9 +110,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, ActionSSH, ActionWorkspaceStart, ActionWorkspaceStop, ActionUpdate},
|
||||
ResourceWorkspace: {ActionApplicationConnect, ActionCreate, ActionCreateAgent, ActionDelete, ActionDeleteAgent, ActionRead, ActionShare, ActionSSH, ActionWorkspaceStart, ActionWorkspaceStop, ActionUpdate},
|
||||
ResourceWorkspaceAgentDevcontainers: {ActionCreate},
|
||||
ResourceWorkspaceAgentResourceMonitor: {ActionCreate, ActionRead, ActionUpdate},
|
||||
ResourceWorkspaceDormant: {ActionApplicationConnect, ActionCreate, ActionCreateAgent, ActionDelete, ActionDeleteAgent, ActionRead, ActionSSH, ActionWorkspaceStart, ActionWorkspaceStop, ActionUpdate},
|
||||
ResourceWorkspaceDormant: {ActionApplicationConnect, ActionCreate, ActionCreateAgent, ActionDelete, ActionDeleteAgent, ActionRead, ActionShare, ActionSSH, ActionWorkspaceStart, ActionWorkspaceStop, ActionUpdate},
|
||||
ResourceWorkspaceProxy: {ActionCreate, ActionDelete, ActionRead, ActionUpdate},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user