pub async fn assert_can_delete_glw_data(
db: &SqlitePool,
current_user: Uuid,
glw_data_id: Uuid,
) -> Result<GlwDataRow, Error>Expand description
Permission gate for deleting a GLW data row. Personal: must be the owner. Group: must be an owner of the group.
The FK saved_renders.glw_data_id is ON DELETE RESTRICT, so a
row with at least one referencing render will fail the DELETE with
a SQLite constraint violation; the route handler maps that to a
human-readable error.
ยงErrors
Returns Error::Forbidden if the user lacks delete permission;
Error::NotFound if the row does not exist.