| 364 | } |
| 365 | |
| 366 | func (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 |