This ticket was generated by AI (to-tickets) from #43.
Parent
#43
What to build
Migrate the trickiest services last, once the pattern is proven (#49): contacts (already caches session validation — the behaviour we generalized), and admin + credits (platform-admin aware). This ticket also resolves the known open detail: the lean AuthContext omits email/name that admin's current middleware returns for audit logging (isPlatformAdmin is derivable from role), so decide whether admin does a separate lookup or uses a scoped richer context.
Acceptance criteria
Blocked by
Parent
#43
What to build
Migrate the trickiest services last, once the pattern is proven (#49):
contacts(already caches session validation — the behaviour we generalized), andadmin+credits(platform-admin aware). This ticket also resolves the known open detail: the leanAuthContextomitsemail/namethat admin's current middleware returns for audit logging (isPlatformAdminis derivable fromrole), so decide whether admin does a separate lookup or uses a scoped richer context.Acceptance criteria
contacts,admin,creditsmount@reloop/auth/middleware; old middleware deletedplatformAdminmacro; role checks no longer hand-rolledemail/namevia an explicit, documented mechanism (separate lookup or scoped context)Blocked by