Skip to content

[People · Phase 2] End a socio's status, automatic lapse and account deletion #124

Description

@toto04

Goal

How a socio's status ends: by hand (resigned, expelled, deceased, other) or automatically when the fee is unpaid after 31 December. Ending removes the account from the Soci group, so Auth drops the Socio role, and lists the account under Deletion pending until someone deletes it. Phase 2: PoliNetworkOrg/admin#144. Design: docs/people/soci.md (PoliNetworkOrg/admin#154). Builds on #122 and #123.

Rules

  • Ending: sets ended_on, end_reason and end_note, removes the user from Soci (Graph), and sets the account to pending_deletion. Auth drops Socio within about a minute.
  • Automatic lapse: a daily job from 1 January, only with SOCI_AUTO_LAPSE=true (default off until the register is complete).
    • It ends every active socio whose fee for the year that just closed is still due, with reason lapsed and ended_on = 31 December.
    • An upload waiting for review protects the socio until it's reviewed; a rejection after the deadline lapses them at the next run.
    • It sends a lapse email to the mailbox.
  • Restore: for mistakes only, with a reason. It is possible while the account still exists: the user is added back to Soci and the end is cleared.
  • Delete account: one user at a time. It deletes the Microsoft 365 user (licences go with it). The record keeps the object ID, mailbox and deletion date, and the account becomes deleted.

Procedures

Procedure Policy
members.end, members.restore admin:access + soci:write
accounts.pendingDeletion, lapse.preview (who would lapse at the next run) admin:access + soci:read
accounts.delete (one ID) admin:access + soci:delete

Done when

  • Procedures, the job, the mock directory's group removal / re-add / deletion and the lapse template exist.
  • Tests cover:
    • the switch off means no lapse;
    • uploaded fees are protected;
    • a Graph failure leaves the socio active, logs the error and retries the next day;
    • restore re-adds to Soci;
    • delete refuses active soci and IDs that aren't pending deletion.

Activity

  1. added
    peoplePeople: Group Admins, Capo Admins, Teams, Soci and census (see the People roadmap)
    on Nov 9, 2026
  2. added theissue type on Nov 9, 2026
  3. coderabbitai commented on Nov 9, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #104 - refactor(people)!: remove Soci, fees, receipts, census and record matching [closed]
    #96 - fix(azure)!: remove group membership writes [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    peoplePeople: Group Admins, Capo Admins, Teams, Soci and census (see the People roadmap)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions