MCPcopy Index your code
hub / github.com/coder/coder / WorkspaceACL

Method WorkspaceACL

codersdk/workspaces.go:774–785  ·  view source on GitHub ↗
(ctx context.Context, workspaceID uuid.UUID)

Source from the content-addressed store, hash-verified

772)
773
774func (c *Client) WorkspaceACL(ctx context.Context, workspaceID uuid.UUID) (WorkspaceACL, error) {
775 res, err := c.Request(ctx, http.MethodGet, fmt.Sprintf("/api/v2/workspaces/%s/acl", workspaceID), nil)
776 if err != nil {
777 return WorkspaceACL{}, err
778 }
779 defer res.Body.Close()
780 if res.StatusCode != http.StatusOK {
781 return WorkspaceACL{}, ReadBodyAsError(res)
782 }
783 var acl WorkspaceACL
784 return acl, json.NewDecoder(res.Body).Decode(&acl)
785}
786
787type UpdateWorkspaceACL struct {
788 // UserRoles is a mapping from valid user UUIDs to the workspace role they

Callers 13

TestUpdateWorkspaceACLFunction · 0.80
TestDeleteWorkspaceACLFunction · 0.80
shareWorkspaceMethod · 0.80
unshareWorkspaceMethod · 0.80
TestSharingShareFunction · 0.80
TestSharingRemoveFunction · 0.80
TestUpdateWorkspaceACLFunction · 0.80
TestDeleteWorkspaceACLFunction · 0.80
TestSharingShareFunction · 0.80

Calls 3

RequestMethod · 0.95
ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65

Tested by 10

TestUpdateWorkspaceACLFunction · 0.64
TestDeleteWorkspaceACLFunction · 0.64
TestSharingShareFunction · 0.64
TestSharingRemoveFunction · 0.64
TestUpdateWorkspaceACLFunction · 0.64
TestDeleteWorkspaceACLFunction · 0.64
TestSharingShareFunction · 0.64
TestSharingRemoveFunction · 0.64