(ctx context.Context, arg database.UpsertTaskSnapshotParams)
| 8294 | } |
| 8295 | |
| 8296 | func (q *querier) UpsertTaskSnapshot(ctx context.Context, arg database.UpsertTaskSnapshotParams) error { |
| 8297 | // Fetch task to build RBAC object for authorization. |
| 8298 | task, err := q.GetTaskByID(ctx, arg.TaskID) |
| 8299 | if err != nil { |
| 8300 | return err |
| 8301 | } |
| 8302 | |
| 8303 | if err := q.authorizeContext(ctx, policy.ActionUpdate, task.RBACObject()); err != nil { |
| 8304 | return err |
| 8305 | } |
| 8306 | |
| 8307 | return q.db.UpsertTaskSnapshot(ctx, arg) |
| 8308 | } |
| 8309 | |
| 8310 | func (q *querier) UpsertTaskWorkspaceApp(ctx context.Context, arg database.UpsertTaskWorkspaceAppParams) (database.TaskWorkspaceApp, error) { |
| 8311 | // Fetch the task to derive the RBAC object and authorize update on it. |
nothing calls this directly
no test coverage detected