Data Layer medium complexity mobile
0
Dependencies
0
Dependents
7
Entities
0
Integrations

Description

Queries Supabase for the authenticated user's roles and organization memberships. Returns structured role and membership records that are consumed by the Role Authorization Service. Provides the authoritative source of role data for the current user.

Feature: Role-Based Access Control

user-role-repository

Responsibilities

  • Fetch all roles assigned to a user from Supabase
  • Fetch user's organization and local association memberships
  • Map raw database records to typed role and membership domain objects

Interfaces

getUserRoles(userId)
getUserMemberships(userId)
getRoleById(roleId)
getMembershipsByOrg(userId, orgId)
watchUserRoles(userId)