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

Method GetNotificationTemplateByID

coderd/database/dbauthz/dbauthz.go:3709–3714  ·  view source on GitHub ↗
(ctx context.Context, id uuid.UUID)

Source from the content-addressed store, hash-verified

3707}
3708
3709func (q *querier) GetNotificationTemplateByID(ctx context.Context, id uuid.UUID) (database.NotificationTemplate, error) {
3710 if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceNotificationTemplate); err != nil {
3711 return database.NotificationTemplate{}, err
3712 }
3713 return q.db.GetNotificationTemplateByID(ctx, id)
3714}
3715
3716func (q *querier) GetNotificationTemplatesByKind(ctx context.Context, kind database.NotificationTemplateKind) ([]database.NotificationTemplate, error) {
3717 // Anyone can read the 'system' and 'custom' notification templates.

Callers

nothing calls this directly

Calls 2

authorizeContextMethod · 0.95

Tested by

no test coverage detected