Skip to main content

assert_can_read_render

Function assert_can_read_render 

Source
pub async fn assert_can_read_render(
    db: &SqlitePool,
    current_user: Uuid,
    render_id: Uuid,
) -> Result<RenderRow, Error>
Expand description

Permission gate for reading a render. Personal: must be the owner. Group: must be a member; members may not see in_progress or failed renders.

§Errors

Returns Error::NotFound if the render does not exist or is not visible to the caller — the two cases are collapsed so the in-progress state of a render the caller cannot yet see is not leaked.