mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add workspaces/acl [delete] endpoint (#19772)
Closes [coder/internal#971](https://github.com/coder/internal/issues/971)
This commit is contained in:
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user