Feature: Add alumni flag to block membership eligibility #503
Labels
No labels
accessibility
api
auth.js
backend
copy
database
defect
dependencies
design
discussion
documentation
duplicate
enhancement
epic
feature
front-end
good first issue
help wanted
invalid
next.js
noscript
on hold
operations
optimization
postgresql
prisma
prototype
question
react
spike
stale
story
tailwind
vulnerability
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
SSE/WebsiteTheSSEquel#503
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Once a user is alumni, they should no longer be able to earn or receive active SSE memberships.
Right now membership is represented by rows in
Memberships, andisMemberis computed from membership count in several places. There is no user-level alumni flag that membership-grant paths can check before creating new membership rows.This creates two risks:
Memberships: { some: {} }or_count.Memberships >= 1Proposed Solution
Add an alumni boolean/state on the user record and use it as a hard block for membership eligibility.
Suggested schema shape:
When a user becomes alumni, set
isAlumni = true. From that point forward, the user cannot receive new memberships and should not be treated as an active member even if historicalMembershipsrows remain in the database.Scope
In scope:
UserAlumniCandidateis approved into anAlumnirecordAlumnirecord to a userMembershipsrows for audit/history; do not delete old membership records just because someone becomes alumniMembership paths to audit include:
next/lib/services/profileCompletionService.tsnext/app/api/memberships/route.tsnext/app/api/event/[id]/attendance/route.tsnext/app/api/invitations/accept/route.tsnext/app/api/officer/route.tsnext/lib/services/authLevelService.tsandnext/lib/authLevelResolver.tsMembershipsexistenceOut of scope:
Acceptance Criteria
Userhas an alumni flag or equivalent persisted boolean stateisMemberandmembershipCount-based access checks do not treat alumni as current active membersAdditional Context
Related new alumni automation issue: #502