MCPcopy Create free account
hub / github.com/coder/coder / UpdateTemplateACL

Method UpdateTemplateACL

codersdk/templates.go:366–376  ·  view source on GitHub ↗
(ctx context.Context, templateID uuid.UUID, req UpdateTemplateACL)

Source from the content-addressed store, hash-verified

364}
365
366func (c *Client) UpdateTemplateACL(ctx context.Context, templateID uuid.UUID, req UpdateTemplateACL) error {
367 res, err := c.Request(ctx, http.MethodPatch, fmt.Sprintf("/api/v2/templates/%s/acl", templateID), req)
368 if err != nil {
369 return err
370 }
371 defer res.Body.Close()
372 if res.StatusCode != http.StatusOK {
373 return ReadBodyAsError(res)
374 }
375 return nil
376}
377
378// TemplateACLAvailable returns available users + groups that can be assigned
379// template perms. The optional req controls the q/limit/offset query

Callers 12

TestCreateWorkspaceFunction · 0.80
TestCreateUserWorkspaceFunction · 0.80
TestWorkspaceBuildFunction · 0.80
TestTemplatesFunction · 0.80
TestTemplateACLFunction · 0.80
TestUpdateTemplateACLFunction · 0.80
TestTemplateAccessFunction · 0.80
TestCheckACLPermissionsFunction · 0.80
TestStartFunction · 0.80

Calls 3

RequestMethod · 0.95
ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65

Tested by 12

TestCreateWorkspaceFunction · 0.64
TestCreateUserWorkspaceFunction · 0.64
TestWorkspaceBuildFunction · 0.64
TestTemplatesFunction · 0.64
TestTemplateACLFunction · 0.64
TestUpdateTemplateACLFunction · 0.64
TestTemplateAccessFunction · 0.64
TestCheckACLPermissionsFunction · 0.64
TestStartFunction · 0.64