Manage User Accounts Within Organizational Scope
The Admin User Management Screen enables Organization Administrators to browse all users within their permitted scope, search by name or role, view detailed profile information, manage multi-organization membership affiliations, and take corrective actions such as updating contact details or correcting membership assignments. The screen enforces Supabase RLS boundaries so admins cannot access users outside their organizational hierarchy. For organizations like NHF with up to 1,400 local associations where members can belong to up to five simultaneously, this screen is the primary tool for clarifying membership affiliation and preventing double-counting in Bufdir grant reports.
User Story
Acceptance Criteria
- Given I am an Organization Administrator, when I open user management, then I see only users within my organizational scope as enforced by Supabase RLS
- Given the user list is displayed, when I search by name or email, then the list filters in real time to matching users only
- Given I select a user, when I view their profile, then I see all organizational memberships, current roles, and account status
- Given a user belongs to multiple local associations, when I view their profile, then all affiliated associations are listed with options to clarify primary affiliation
- Given I update a user's profile or membership, when I confirm the change, then the audit edge function logs the actor, timestamp, action type, and affected entity
- Given I attempt to access a user outside my organizational scope, when the request is processed, then the RLS policy blocks the query and returns an empty result
Business Value
Manual membership management via spreadsheets is a top pain point for NHF and other organizations. A purpose-built user management interface with RLS-enforced scope boundaries replaces error-prone manual processes, directly improving data quality for Bufdir compliance reporting and reducing the risk of double-counting that results in grant clawbacks.
Components
- Admin User Management Screen ui
- Admin Management Service service
- Admin Repository data
- Admin Audit Edge Function infrastructure