(ctx context.Context, id uuid.UUID)
| 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. |
| 8460 | template, err := q.db.GetTemplateByID(ctx, id) |
| 8461 | if err != nil { |
| 8462 | return nil, err |
| 8463 | } |
| 8464 | if err := q.authorizeContext(ctx, policy.ActionUpdate, template); err != nil { |
| 8465 | return nil, err |
| 8466 | } |
| 8467 | return q.db.GetTemplateUserRoles(ctx, id) |
| 8468 | } |
| 8469 | |
| 8470 | func (q *querier) GetAuthorizedWorkspaces(ctx context.Context, arg database.GetWorkspacesParams, _ rbac.PreparedAuthorized) ([]database.GetWorkspacesRow, error) { |
| 8471 | // TODO Delete this function, all GetWorkspaces should be authorized. For now just call GetWorkspaces on the authz querier. |
nothing calls this directly
no test coverage detected