pub async fn set_member_expiry(
pool: &PgPool,
actor: &Actor,
project_id: Uuid,
user_id: Uuid,
until: Option<NaiveDate>,
) -> AppResult<()>Expand description
Sets or clears when a membership is meant to end (“member until”, issue #173 step 8). Only a flag on the season page: nothing removes the member when the date has passed.
§Invariants
- Permission: the group is visible to the actor (“not found” otherwise) and the actor manages it (or is an administrator; 403).
- Locks: the group row (
FOR UPDATE), as the other membership changes. - Data: the user is a member (“not found” otherwise).
- Audit:
project.member_expiry. - Notifications / webhooks: none.
- Atomic: one transaction.