Members: approve refuses no-membership/unknown accounts; neutral text for legacy suspensions #65

Merged
heimdall merged 2 commits from heimdall/approve-null-membership into main 2026-11-11 16:39:48 +00:00
Member

Remaining code parts of follow-up suspension-live-sessions-end.

  1. OnPostApproveAsync threw NullReferenceException for an account with no membership and InvalidOperationException for an unknown id. Now refuses with the existing notices (NoMembershipNotice; unknown id uses the NoSuchAccount notice) and writes no rows or receipt. Basis: docs/oidc-issuer.md and registration-gates.md say the chat tier holds no membership and the issuer writes none; nothing says admin approval creates one, so no authority is invented.
  2. A Suspended membership with no stored reason shows admins a fixed "Suspended before reasons were recorded". Old text is never read from AuditEvent.Detail; members never see it. One sentence added to docs/registration-gates.md.

Tests: MembersPageNoticeTests (4 new, through the real page). Mutations (revert guard, ignore reason, drop admin gate) each turn tests red. Full suite: same 43 failures as main e12b8e2 in this environment (BridgeCli, ConceptTally, OIDC/Results.Json, ProviderAdvertisement), none new.

Not merged, not deployed.

🤖 Generated with Claude Code

Remaining code parts of follow-up suspension-live-sessions-end. 1. `OnPostApproveAsync` threw NullReferenceException for an account with no membership and InvalidOperationException for an unknown id. Now refuses with the existing notices (`NoMembershipNotice`; unknown id uses the NoSuchAccount notice) and writes no rows or receipt. Basis: docs/oidc-issuer.md and registration-gates.md say the chat tier holds no membership and the issuer writes none; nothing says admin approval creates one, so no authority is invented. 2. A Suspended membership with no stored reason shows admins a fixed "Suspended before reasons were recorded". Old text is never read from AuditEvent.Detail; members never see it. One sentence added to docs/registration-gates.md. Tests: MembersPageNoticeTests (4 new, through the real page). Mutations (revert guard, ignore reason, drop admin gate) each turn tests red. Full suite: same 43 failures as main e12b8e2 in this environment (BridgeCli, ConceptTally, OIDC/Results.Json, ProviderAdvertisement), none new. Not merged, not deployed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Approve threw NullReferenceException (user.Membership!) for a chat-tier account and
InvalidOperationException for an unknown id. It now refuses with the existing visible
notice and writes nothing; the docs say the chat tier holds no membership, so approval
does not invent one. Suspended rows with no stored reason show admins a fixed
"Suspended before reasons were recorded"; the old text is not read from the audit trail.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/Bifrost!65
No description provided.