feat: add workspaces/acl [delete] endpoint (#19772)

Closes
[coder/internal#971](https://github.com/coder/internal/issues/971)
This commit is contained in:
Brett Kolodny
2025-09-12 12:21:01 -04:00
committed by GitHub
parent 8e79dbb16f
commit 854f3c0187
15 changed files with 371 additions and 0 deletions
+12
View File
@@ -722,6 +722,18 @@ func (c *Client) UpdateWorkspaceACL(ctx context.Context, workspaceID uuid.UUID,
return nil
}
func (c *Client) DeleteWorkspaceACL(ctx context.Context, workspaceID uuid.UUID) error {
res, err := c.Request(ctx, http.MethodDelete, fmt.Sprintf("/api/v2/workspaces/%s/acl", workspaceID), nil)
if err != nil {
return err
}
defer res.Body.Close()
if res.StatusCode != http.StatusNoContent {
return ReadBodyAsError(res)
}
return nil
}
// ExternalAgentCredentials contains the credentials needed for an external agent to connect to Coder.
type ExternalAgentCredentials struct {
Command string `json:"command"`