Skip to main content

confirm

Function confirm 

Source
pub async fn confirm(
    pool: &PgPool,
    actor: &Actor,
    project_id: Uuid,
    note: &str,
) -> AppResult<ReviewRecord>
Expand description

Confirms that the access of a restricted group was reviewed.

ยงInvariants

  • Permission: managers of the group and administrators (403); the group must be restricted (409); the note has at most MAX_NOTE_CHARS characters (400).
  • Locks: the group row (FOR UPDATE), so the member list that is stored is the one the confirmation refers to.
  • Data: appends a record with the member list and the policy as they are now; records are never changed.
  • Audit: project.access_review with the note and the member count.
  • Notifications / webhooks: the other managers get an access alert; no webhooks.
  • Atomic: one transaction.