Skip to content

History of commits

4473 commits

feat(auth): add browsing the site as another user

An administrator holding users.impersonate opens a session of the account rather than a swapped cookie: the row carries who opened it and which session to return to, so it is visible in the audit trail and revocable like any other. Their own session waits in a second cookie instead of being closed, and nobody may browse as an account that outranks them. The session lasts an hour and is never extended, so a forgotten tab resolves itself: the authenticator falls back to the parent cookie and the administrator is themselves again. Signing out during impersonation closes both sessions. Invisible to the user — the visit fields, the IP history and 'my devices' are left alone — but never to the record: both ends and every changing request are logged, with the impersonator named. ImpersonationVoter refuses the permissions listed in auth.impersonation.denied_permissions whatever the roles say.
simba77 16 avq 2026 11:11 Branch: 10.x 52376de

feat(admin): add the sign-in log screen

/admin/auth-log lists the audit trail behind the new admin.auth_log.view permission, with filters by account and by kind of event. An account matches both as the subject and as the actor, and an event key from a module the core knows nothing about is shown as it is rather than failing the page.
simba77 16 avq 2026 10:45 Branch: 10.x 78073c3

feat(auth): record the sign-in audit trail

Adds auth_events and the logger writing it: sign-ins and refusals, password changes and recoveries, revoked sessions, granted and revoked roles. The logger fills in the address, the browser and the actor itself, so no caller can forget them, and the impersonator is named rather than the account being browsed as. Attempts refused by the throttle are not recorded: they follow from failures already in the log, and a row per attempt would let anyone fill the table. auth:cleanup drops entries older than --event-retention-days (180 by default). Fixes a gap left by the session work: completing a password recovery now revokes every session of the owner, without the exception a password change makes for the current one — whoever recovers a password is not signed in.
simba77 16 avq 2026 10:45 Branch: 10.x 079a1e4