(ctx context.Context, arg database.GetFileByHashAndCreatorParams)
| 3432 | } |
| 3433 | |
| 3434 | func (q *querier) GetFileByHashAndCreator(ctx context.Context, arg database.GetFileByHashAndCreatorParams) (database.File, error) { |
| 3435 | file, err := q.db.GetFileByHashAndCreator(ctx, arg) |
| 3436 | if err != nil { |
| 3437 | return database.File{}, err |
| 3438 | } |
| 3439 | err = q.authorizeContext(ctx, policy.ActionRead, file) |
| 3440 | if err != nil { |
| 3441 | // Check the user's access to the file's templates. |
| 3442 | if q.authorizeUpdateFileTemplate(ctx, file) != nil { |
| 3443 | return database.File{}, err |
| 3444 | } |
| 3445 | } |
| 3446 | |
| 3447 | return file, nil |
| 3448 | } |
| 3449 | |
| 3450 | func (q *querier) GetFileByID(ctx context.Context, id uuid.UUID) (database.File, error) { |
| 3451 | file, err := q.db.GetFileByID(ctx, id) |
nothing calls this directly
no test coverage detected