-
Notifications
You must be signed in to change notification settings - Fork 661
Closed
Labels
feat/businessesTasks related to the feature of adding business/teams <> customer relationship support.Tasks related to the feature of adding business/teams <> customer relationship support.polar-teamIssues that will be handled by the core Polar teamIssues that will be handled by the core Polar team
Description
Goal
Owners and billing managers can view and manage team members from the portal
Parent Issue: #7905
Depends on: #9007 (Phase 4.1: Member Portal Authentication)
Note: Owners and billing managers have identical permissions for team management.
Backend Tasks
- Add portal endpoints for member management:
GET /customer-portal/members- List members of current customer (owner/billing_manager)PATCH /customer-portal/members/{id}- Update role (owner/billing_manager)DELETE /customer-portal/members/{id}- Remove member (owner/billing_manager, cannot remove self)
- Use
CustomerPortalBillingManagerauth for these endpoints - Add tests for role enforcement (403 for regular members)
- Backend cleanup: Add validation preventing user from demoting themselves
- Backend cleanup: Ensure that exactly one owner always exists per customer
Frontend Tasks
- Add "Team" page to portal navigation (visible to owners/billing_managers only)
- Display member list with name, email, role, joined date
- Add role selector dropdown for each member (except self)
- Add "Remove member" action with confirmation dialog
- Show warning when changing roles
Key Files
server/polar/customer_portal/endpoints/member.py(new)server/polar/customer_portal/service/member.py(new or extend existing)clients/apps/web/src/app/(main)/[organization]/portal/team/(new)
E2E Test
1. Owner logs in → Sees Team page
2. Billing manager logs in → Sees Team page
3. Regular member logs in → Does NOT see Team page
4. Owner changes a member's role from "member" to "billing_manager" → Success
5. Attempts to remove last owner → Error
Value
Owners/billing managers can manage their team without contacting support
Estimated Effort
- Backend: 1 day
- Frontend: 1.5 days
- Testing: 0.5 days
- Total: 3 days
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feat/businessesTasks related to the feature of adding business/teams <> customer relationship support.Tasks related to the feature of adding business/teams <> customer relationship support.polar-teamIssues that will be handled by the core Polar teamIssues that will be handled by the core Polar team
Type
Projects
Status
Done