pub async fn acknowledge_all(
pool: &PgPool,
actor: &Actor,
revision_id: Uuid,
only: Option<&[Uuid]>,
note: &str,
) -> AppResult<Acknowledged>Expand description
Acknowledges every open impact on a dependent revision with one note –
or only those in only (the ones the user saw, so a check flagged a
moment ago is not acknowledged unseen). Impacts resolved in the meantime
are skipped; if none is left, nothing changes (conflict). Same rules as
acknowledge; one transaction, one audit entry per impact.
§Invariants
- Permission: CAD editor; the revision is visible (“not found” otherwise) and in a group the actor may edit (403); a note is needed (400); a given list is not empty and names only impacts on this revision (400); at least one impact is still open (409).
- Locks: the open impact rows (
FOR UPDATE), before they are resolved. - Audit:
impact.acknowledgeper impact. - Notifications / webhooks: none.
- Atomic: one transaction; impacts resolved in the meantime are skipped and counted.