Skip to main content

acknowledge

Function acknowledge 

Source
pub async fn acknowledge(
    pool: &PgPool,
    actor: &Actor,
    id: Uuid,
    note: &str,
) -> AppResult<Impact>
Expand description

Marks an open impact as checked: the dependent needs no change.

§Invariants

  • Permission: CAD editor; the impact is on an item the actor sees (“not found” otherwise) and in a group the actor may edit (403); a note is needed (400); the impact is open (409).
  • Locks: the impact row, through the UPDATE ... WHERE resolved_at IS NULL; when it was resolved in the meantime the actor gets a 409.
  • Audit: impact.acknowledge.
  • Notifications / webhooks: none.
  • Atomic: one transaction.