Skip to main content

confirm_concession

Function confirm_concession 

Source
pub async fn confirm_concession(
    pool: &PgPool,
    actor: &Actor,
    id: Uuid,
) -> AppResult<Deviation>
Expand description

A reviewer confirms a “use as is” deviation of an as-built revision in review – the separate acceptance of a concession (#152 step 9).

§Invariants

  • Permission: CAD editor who sees the revision (a hidden one is “not found”), is a reviewer of an open change order in review that contains it (403) and did not record the deviation (403, four-eyes).
  • Data: only “use as is” deviations (400); confirming again is a no-op. Any later change of the deviation clears the confirmation.
  • Locks: the deviation row (FOR UPDATE).
  • Audit: as_built.concession_confirm on the revision.
  • Notifications / webhooks: none.