(ctx context.Context, id uuid.UUID)
| 8444 | } |
| 8445 | |
| 8446 | func (q *querier) GetTemplateGroupRoles(ctx context.Context, id uuid.UUID) ([]database.TemplateGroup, error) { |
| 8447 | // An actor is authorized to read template group roles if they are authorized to update the template. |
| 8448 | template, err := q.db.GetTemplateByID(ctx, id) |
| 8449 | if err != nil { |
| 8450 | return nil, err |
| 8451 | } |
| 8452 | if err := q.authorizeContext(ctx, policy.ActionUpdate, template); err != nil { |
| 8453 | return nil, err |
| 8454 | } |
| 8455 | return q.db.GetTemplateGroupRoles(ctx, id) |
| 8456 | } |
| 8457 | |
| 8458 | func (q *querier) GetTemplateUserRoles(ctx context.Context, id uuid.UUID) ([]database.TemplateUser, error) { |
| 8459 | // An actor is authorized to query template user roles if they are authorized to update the template. |
nothing calls this directly
no test coverage detected