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

Method GetTemplateVersionsByIDs

coderd/database/dbauthz/dbauthz.go:4473–4478  ·  view source on GitHub ↗

GetTemplateVersionsByIDs is only used for workspace build data. The workspace is already fetched.

(ctx context.Context, ids []uuid.UUID)

Source from the content-addressed store, hash-verified

4471// GetTemplateVersionsByIDs is only used for workspace build data.
4472// The workspace is already fetched.
4473func (q *querier) GetTemplateVersionsByIDs(ctx context.Context, ids []uuid.UUID) ([]database.TemplateVersion, error) {
4474 if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceSystem); err != nil {
4475 return nil, err
4476 }
4477 return q.db.GetTemplateVersionsByIDs(ctx, ids)
4478}
4479
4480func (q *querier) GetTemplateVersionsByTemplateID(ctx context.Context, arg database.GetTemplateVersionsByTemplateIDParams) ([]database.TemplateVersion, error) {
4481 // An actor can read template versions if they can read the related template.

Callers

nothing calls this directly

Calls 2

authorizeContextMethod · 0.95

Tested by

no test coverage detected