Dashboard Scope Service
Component Detail
Service Layer
medium complexity
backend
1
Dependencies
2
Dependents
5
Entities
0
Integrations
Description
Resolves the data visibility scope for a given authenticated user and role before dashboard queries are executed. Maps the user's role and organization membership to the correct set of local_association_ids or organization_ids, ensuring coordinators only see their own association data and org admins see all associations under their organization.
dashboard-scope-service
Responsibilities
- Resolve the set of local_association_ids accessible to a coordinator
- Resolve the set of all local_association_ids under an organization for org admins
- Validate that the requesting user has dashboard access (coordinator or admin role only)
- Return a typed scope object consumed by the Analytics Service for query parameterization
Interfaces
resolveScope(userId, organizationId)
getCoordinatorScope(userId)
getOrgAdminScope(organizationId)
validateDashboardAccess(userId, role)
Relationships
Dependents (2)
Components that depend on this component
Related Data Entities (5)
Data entities managed by this component