Juanfran d091491880
🐛 Record org role changes in the admin console audit log (#13342)
When an organization owner changes a member's org role, the admin console
audit log missed several entries:

- The consumers rework dropped update-organization-member-role and
  transfer-team-ownership from the admin console allowlist, so no org role
  change and no team passed to the organization owner reached it.
- set-organization-member-viewer turned pending editor and admin team
  invitations into viewer invitations without leaving an event.
- The org role entry identified the member by id and email only.

Both names are back on the allowlist. set-organization-member-viewer now
records each invitation it downgrades as update-team-invitation-role, the
event of the same change made by hand, attributed to the organization
owner, inside its transaction. It takes an optional organization-id and
puts it in those events, so a team moved to another organization before
the event is archived cannot misroute it. The admin console consumer fills
:member-name from :member-id for update-organization-member-role only, from
the profile it already loads, so the role change waits on no lookup.

AI-assisted-by: claude-opus-5-5
2026-11-26 09:35:21 +01:00
..