Skip to content

Add MembershipService for self-service requests and invitation responses - #19

Merged
dcl10 merged 1 commit into
mainfrom
feature/membership-service
Apr 30, 2026
Merged

Add MembershipService for self-service requests and invitation responses#19
dcl10 merged 1 commit into
mainfrom
feature/membership-service

Conversation

@dcl10

@dcl10 dcl10 commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Description

Adds MembershipService to handle the self-service side of team membership — users can request to join a team, and respond to invitations or their own requests.

New endpoints (all authenticated, no project-manager role required):

Method Route Description
POST /api/users/me/membership-requests/{teamId} Request to join a proposed team on an open project
PUT /api/users/me/memberships/{teamId}/accept Accept an invitation or self-request
PUT /api/users/me/memberships/{teamId}/decline Decline an invitation or self-request

Accepting or declining sends a notification email to the project creator.

Other changes:

  • Requested added to MembershipStatus enum to distinguish self-requests from PM-driven invites
  • Per-project duplicate membership rule enforced on both the invite path (TeamService.AddMemberAsync) and the request path (MembershipService.RequestAsync) — a user cannot have an active membership on more than one team within the same project

Linked issues

(Optional) Screenshots

N/A — backend-only change.

Implements issue #7: users can request to join a proposed team on an open project,
and accept or decline invitations (or their own requests). Accepting/declining sends
a notification email to the project creator. A Requested value is added to
MembershipStatus; the per-project duplicate membership rule is enforced across
both the invite (TeamService) and request (MembershipService) paths.

Endpoints:
  POST /api/users/me/membership-requests/{teamId}   — request to join
  PUT  /api/users/me/memberships/{teamId}/accept     — accept invitation/request
  PUT  /api/users/me/memberships/{teamId}/decline    — decline invitation/request

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dcl10
dcl10 merged commit 31781e7 into main Apr 30, 2026
1 check passed
@dcl10
dcl10 deleted the feature/membership-service branch April 30, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Membership service

1 participant