X-Portal-User-Subject and X-Portal-User-Email named the acting person for
any service client. Any tenants.read client (werkmeister-svc, pruefwerk-svc,
firmwerk-svc) could thereby set the audit actor of a document download, and
a future tenants.write client could act in a user's name on the team routes.
portalUser honours the headers only from a client that holds the users
group (group users.act, satisfied by the existing users grant: only the
portal's service client in stage and prod), as staffActor does for
X-Staff-*. A user token speaks for itself and the headers are ignored.
Used by teamActor, projectActor/projectActorType, the document download
audit and the trial extension. No AUTHZ_RULES change is needed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf