Skip to main content

Module mandate_use_cases

Module mandate_use_cases 

Source
Expand description

Use cases for the Mandate feature (Story 3.4 — FR7 INV-14).

Three operations:

  1. MandateUseCases::issue — a syndic issues a mandate for an external professional (notaire, avocat, AMO, architecte, BET, gardien). The caller (handler) MUST have already enforced the syndic / superadmin role check.
  2. MandateUseCases::assert_mandate_authorizes — guard used by downstream handlers (notarial deeds, litigation actions, …) to verify that a mandataire is still authorised before performing an action. Returns the correctly-typed AppError::Mandate* so the upstream caller surfaces 403 with the right kind (mandate_expired, mandate_revoked, mandate_invalid_scope).
  3. MandateUseCases::revoke — early revocation (before valid_until). Handler enforces syndic / superadmin role.

Also surface read-only helpers (list_active_for_subject, list_for_scope, get) for the audit / detail views.

Structs§

MandateUseCases