Service Layer medium complexity backend
1
Dependencies
1
Dependents
5
Entities
0
Integrations

Description

Enforces role-based visibility rules for dashboard metrics, ensuring coordinators only see their local association's data while org admins see full organization scope. Validates the requesting user's role and organization membership before returning any metric data.

Feature: Dashboard KPIs

kpi-access-control-service

Responsibilities

  • Resolve the metric scope (local association vs full org) based on user role
  • Validate that the requesting user belongs to the requested organization
  • Filter metric results to permitted scope before returning to client

Interfaces

resolveMetricScope(userId, organizationId)
validateOrgAccess(userId, organizationId)
getPermittedMetrics(userRole)
enforceLocalAssociationScope(userId)

Relationships

Dependencies (1)

Components this component depends on

Dependents (1)

Components that depend on this component