Member Associations
Feature Detail
Description
Member Associations manages the relationship between individual users and the organizational units they belong to within the Meander platform. A user - typically a peer mentor or coordinator - may be a member of multiple local chapters or associations simultaneously (NHF allows up to five). This feature provides the administrative surface for managing these memberships: inviting users into an organization unit, assigning their primary association for activity attribution, and handling the edge cases that arise from multi-membership such as duplicate activity detection and cross-chapter visibility controls. The feature operates within the organization hierarchy established by Multi-Organization Hierarchy and enforces that a user's memberships remain within a single top-level organization's tree.
Analysis
Multi-membership is a real operational reality for NHF, where a peer mentor active in both a local sports chapter and a local health chapter should be counted correctly in both contexts without double-reporting their activities to Bufdir. Without explicit membership management, the platform has no way to resolve which chapter an activity belongs to when a user is a member of several, creating attribution ambiguity and potential compliance risk. The invite-based membership flow also supports the platform's controlled onboarding model - users do not self-select into organizations, they are invited by an administrator, which maintains data governance. Correct membership resolution is a prerequisite for accurate aggregated statistics, Bufdir reporting, and coordinator oversight, making this feature foundational for the reporting value proposition even though it is not directly visible to peer mentors.
User-to-organization relationships are stored in the organization_memberships table with columns for user_id, organization_id, role, is_primary, and joined_at. A unique constraint on (user_id, organization_id) prevents duplicate membership records. The primary membership flag is enforced as a single-row constraint per user at the application layer - changing the primary membership atomically unsets the previous primary in the same transaction. The admin portal member association page lists current members of the selected organizational unit with their roles and primary designation, and provides an invite form that generates a time-limited invitation token. The duplicate activity detection feature (admin-activity-oversight) queries the organization_memberships table to identify when the same user's activity may be counted across multiple chapters. On the mobile app, the role switch widget (profile-switching area) allows a user with multiple memberships to switch their active organizational context, which updates the session context used for activity attribution without requiring re-authentication.
Components (42)
Shared Components
These components are reused across multiple features
User Interface (9)
Service Layer (15)
Data Layer (8)
Infrastructure (7)
User Stories
No user stories have been generated for this feature yet.