mirror of
https://github.com/plausible/analytics.git
synced 2024-12-27 03:21:37 +03:00
373d4dd665
* Turn `Plausible.Auth.UserSession` into full schema * Implement token based sessions and use them as default * Ignore expired user sessions during retrieval from DB * Implement plug bumping user session last used and timeout timestamps * Implement Oban worker removing expired user sessions with grace period * Implement legacy session conversion on touch, when applicable * Update `UserAuth` moduledoc * Extend `UserAuth` tests to account for db-backed session tokens * Update CHANGELOG * Add tests for `UserSessionTouch` plug * Add test for `CleanUserSessions` worker * Add logging of legacy session retrievals * Use single update permitting stale records when touching user session * Don't fetch session and user for external API endpoints (/api/event too) * Refactor `Users.with_subscription/1` and expose helper query * Skip fetching session in legacy `SessionTimeoutPlug` * Rely on user session assign from `AuthContext` in `SentryContext` * Silence legacy session warnings in `UserSessionTouchTest` * Rely on session assign from `AuthPlug` in `SuperAdminOnlyPlug` * Change `UserAuth` to get session, user and last subscription in one go * Avoid refetching user session in `AuthorizeSiteAccess` plug * Fix code formatting * Refactor `UserAuth.get_user_token/1` (h/t @aerosol) * Remove bogus empty opts from `scope` declarations in router * Only touch session once an hour and keep `user.last_seen` in sync * Bring back logging of legacy token use |
||
---|---|---|
.. | ||
accept_traffic_until_test.exs | ||
check_usage_test.exs | ||
clean_invitations_test.exs | ||
clean_user_sessions_test.exs | ||
clickhouse_clean_sites_test.exs | ||
expire_domain_change_transitions_test.exs | ||
import_analytics_test.exs | ||
lock_sites_test.exs | ||
notify_annual_renewal_test.exs | ||
notify_exported_analytics_test.exs | ||
oban_error_reporter_test.exs | ||
schedule_email_reports_test.exs | ||
send_check_stats_emails_test.exs | ||
send_email_report_test.exs | ||
send_site_setup_emails_test.exs | ||
send_trial_notifications_test.exs | ||
traffic_change_notifier_test.exs |